From 3241322d3fd1eab741d672a6763547bcd24367f0 Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Wed, 16 Apr 2025 03:03:09 +0000 Subject: [PATCH] [skip ci] Archive e961c970c947c09c22d659f3fe7b31b446e2c197 --- .../Az.ConnectedKubernetes.csproj | 2 +- .../Az.ConnectedKubernetes.format.ps1xml | 382 ++- .../Az.ConnectedKubernetes.psd1 | 3 +- .../Properties/AssemblyInfo.cs | 34 +- .../check-dependencies.ps1 | 6 +- .../exports/Get-AzConnectedKubernetes.ps1 | 21 +- ...et-AzConnectedKubernetesUserCredential.ps1 | 45 +- .../exports/New-AzConnectedKubernetes.ps1 | 110 +- .../exports/ProxyCmdletDefinitions.ps1 | 440 ++- .../exports/Remove-AzConnectedKubernetes.ps1 | 18 +- .../exports/Set-AzConnectedKubernetes.ps1 | 184 +- .../exports/Update-AzConnectedKubernetes.ps1 | 62 +- .../generate-info.json | 2 +- .../generated/Module.cs | 27 +- .../generated/api/ConnectedKubernetes.cs | 2714 +++++++++++++---- .../AadProfile.PowerShell.cs | 34 +- .../AadProfile.TypeConverter.cs | 6 +- .../{Api20240715Preview => }/AadProfile.cs | 23 +- .../AadProfile.json.cs | 14 +- .../AgentError.PowerShell.cs | 38 +- .../AgentError.TypeConverter.cs | 6 +- .../{Api20240715Preview => }/AgentError.cs | 26 +- .../AgentError.json.cs | 24 +- .../generated/api/Models/Any.PowerShell.cs | 4 +- .../generated/api/Models/Any.cs | 6 +- .../generated/api/Models/Any.json.cs | 2 +- .../ConnectedCluster.PowerShell.cs | 606 ---- .../ConnectedClusterProperties.PowerShell.cs | 462 --- .../ArcAgentProfile.PowerShell.cs | 42 +- .../ArcAgentProfile.TypeConverter.cs | 6 +- .../ArcAgentProfile.cs | 55 +- .../ArcAgentProfile.json.cs | 20 +- .../ArcAgentryConfigurations.PowerShell.cs | 34 +- .../ArcAgentryConfigurations.TypeConverter.cs | 6 +- .../ArcAgentryConfigurations.cs | 35 +- .../ArcAgentryConfigurations.json.cs | 14 +- ...figurationsProtectedSettings.PowerShell.cs | 20 +- ...urationsProtectedSettings.TypeConverter.cs | 6 +- ...cAgentryConfigurationsProtectedSettings.cs | 6 +- ...figurationsProtectedSettings.dictionary.cs | 4 +- ...tryConfigurationsProtectedSettings.json.cs | 8 +- ...gentryConfigurationsSettings.PowerShell.cs | 20 +- ...tryConfigurationsSettings.TypeConverter.cs | 6 +- .../ArcAgentryConfigurationsSettings.cs | 6 +- ...gentryConfigurationsSettings.dictionary.cs | 4 +- .../ArcAgentryConfigurationsSettings.json.cs | 8 +- .../api/Models/ConnectedCluster.PowerShell.cs | 604 ++++ .../ConnectedCluster.TypeConverter.cs | 6 +- .../ConnectedCluster.cs | 466 ++- .../ConnectedCluster.json.cs | 20 +- .../ConnectedClusterIdentity.PowerShell.cs | 34 +- .../ConnectedClusterIdentity.TypeConverter.cs | 6 +- .../ConnectedClusterIdentity.cs | 31 +- .../ConnectedClusterIdentity.json.cs | 18 +- .../ConnectedClusterList.PowerShell.cs | 30 +- .../ConnectedClusterList.TypeConverter.cs | 6 +- .../ConnectedClusterList.cs | 22 +- .../ConnectedClusterList.json.cs | 12 +- .../ConnectedClusterPatch.PowerShell.cs | 42 +- .../ConnectedClusterPatch.TypeConverter.cs | 6 +- .../ConnectedClusterPatch.cs | 50 +- .../ConnectedClusterPatch.json.cs | 12 +- ...nectedClusterPatchProperties.PowerShell.cs | 32 +- ...tedClusterPatchProperties.TypeConverter.cs | 6 +- .../ConnectedClusterPatchProperties.cs | 27 +- .../ConnectedClusterPatchProperties.json.cs | 14 +- .../ConnectedClusterPatchTags.PowerShell.cs | 22 +- ...ConnectedClusterPatchTags.TypeConverter.cs | 6 +- .../ConnectedClusterPatchTags.cs | 6 +- .../ConnectedClusterPatchTags.dictionary.cs | 4 +- .../ConnectedClusterPatchTags.json.cs | 8 +- .../ConnectedClusterProperties.PowerShell.cs | 460 +++ ...onnectedClusterProperties.TypeConverter.cs | 6 +- .../ConnectedClusterProperties.cs | 288 +- .../ConnectedClusterProperties.json.cs | 72 +- ...rtiesMiscellaneousProperties.PowerShell.cs | 20 +- ...esMiscellaneousProperties.TypeConverter.cs | 6 +- ...lusterPropertiesMiscellaneousProperties.cs | 6 +- ...rtiesMiscellaneousProperties.dictionary.cs | 4 +- ...rPropertiesMiscellaneousProperties.json.cs | 8 +- .../api/Models/ConnectedKubernetesIdentity.cs | 12 + .../ConnectedKubernetesIdentity.json.cs | 8 +- .../CredentialResult.PowerShell.cs | 30 +- .../CredentialResult.TypeConverter.cs | 6 +- .../CredentialResult.cs | 16 +- .../CredentialResult.json.cs | 14 +- .../CredentialResults.PowerShell.cs | 54 +- .../CredentialResults.TypeConverter.cs | 6 +- .../CredentialResults.cs | 71 +- .../CredentialResults.json.cs | 16 +- .../ErrorAdditionalInfo.PowerShell.cs | 28 +- .../ErrorAdditionalInfo.TypeConverter.cs | 6 +- .../Models/{Api20 => }/ErrorAdditionalInfo.cs | 16 +- .../{Api20 => }/ErrorAdditionalInfo.json.cs | 16 +- .../{Api20 => }/ErrorDetail.PowerShell.cs | 40 +- .../{Api20 => }/ErrorDetail.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/ErrorDetail.cs | 51 +- .../Models/{Api20 => }/ErrorDetail.json.cs | 28 +- .../{Api20 => }/ErrorResponse.PowerShell.cs | 44 +- .../ErrorResponse.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/ErrorResponse.cs | 61 +- .../Models/{Api20 => }/ErrorResponse.json.cs | 10 +- .../Gateway.PowerShell.cs | 28 +- .../Gateway.TypeConverter.cs | 6 +- .../{Api20240715Preview => }/Gateway.cs | 12 +- .../{Api20240715Preview => }/Gateway.json.cs | 12 +- .../HybridConnectionConfig.PowerShell.cs | 46 +- .../HybridConnectionConfig.TypeConverter.cs | 6 +- .../HybridConnectionConfig.cs | 36 +- .../HybridConnectionConfig.json.cs | 32 +- ...sterUserCredentialProperties.PowerShell.cs | 28 +- ...rUserCredentialProperties.TypeConverter.cs | 6 +- .../ListClusterUserCredentialProperties.cs | 24 +- ...istClusterUserCredentialProperties.json.cs | 12 +- .../OidcIssuerProfile.PowerShell.cs | 34 +- .../OidcIssuerProfile.TypeConverter.cs | 6 +- .../OidcIssuerProfile.cs | 17 +- .../OidcIssuerProfile.json.cs | 16 +- .../Operation.PowerShell.cs | 46 +- .../Operation.TypeConverter.cs | 6 +- .../{Api20240715Preview => }/Operation.cs | 67 +- .../Operation.json.cs | 16 +- .../OperationDisplay.PowerShell.cs | 38 +- .../OperationDisplay.TypeConverter.cs | 6 +- .../OperationDisplay.cs | 18 +- .../OperationDisplay.json.cs | 16 +- .../OperationList.PowerShell.cs | 30 +- .../OperationList.TypeConverter.cs | 6 +- .../{Api20240715Preview => }/OperationList.cs | 24 +- .../OperationList.json.cs | 14 +- .../Models/{Api20 => }/Resource.PowerShell.cs | 32 +- .../{Api20 => }/Resource.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/Resource.cs | 21 +- .../api/Models/{Api20 => }/Resource.json.cs | 20 +- .../SecurityProfile.PowerShell.cs | 30 +- .../SecurityProfile.TypeConverter.cs | 6 +- .../SecurityProfile.cs | 19 +- .../SecurityProfile.json.cs | 10 +- ...urityProfileWorkloadIdentity.PowerShell.cs | 24 +- ...tyProfileWorkloadIdentity.TypeConverter.cs | 6 +- .../SecurityProfileWorkloadIdentity.cs | 9 +- .../SecurityProfileWorkloadIdentity.json.cs | 10 +- .../SystemComponent.PowerShell.cs | 38 +- .../SystemComponent.TypeConverter.cs | 6 +- .../SystemComponent.cs | 20 +- .../SystemComponent.json.cs | 18 +- .../SystemData.PowerShell.cs | 46 +- .../SystemData.TypeConverter.cs | 6 +- .../{Api20240715Preview => }/SystemData.cs | 48 +- .../SystemData.json.cs | 20 +- .../{Api20 => }/TrackedResource.PowerShell.cs | 40 +- .../TrackedResource.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/TrackedResource.cs | 44 +- .../{Api20 => }/TrackedResource.json.cs | 19 +- .../TrackedResourceTags.PowerShell.cs | 20 +- .../TrackedResourceTags.TypeConverter.cs | 6 +- .../Models/{Api20 => }/TrackedResourceTags.cs | 6 +- .../TrackedResourceTags.dictionary.cs | 4 +- .../{Api20 => }/TrackedResourceTags.json.cs | 8 +- .../Support/AuthenticationMethod.Completer.cs | 39 - .../AuthenticationMethod.TypeConverter.cs | 59 - .../api/Support/AuthenticationMethod.cs | 98 - .../Support/AutoUpgradeOptions.Completer.cs | 41 - .../AutoUpgradeOptions.TypeConverter.cs | 61 - .../api/Support/AutoUpgradeOptions.cs | 100 - .../Support/AzureHybridBenefit.Completer.cs | 43 - .../AzureHybridBenefit.TypeConverter.cs | 59 - .../api/Support/AzureHybridBenefit.cs | 100 - .../Support/ConnectedClusterKind.Completer.cs | 35 - .../ConnectedClusterKind.TypeConverter.cs | 59 - .../api/Support/ConnectedClusterKind.cs | 96 - .../Support/ConnectivityStatus.Completer.cs | 47 - .../ConnectivityStatus.TypeConverter.cs | 59 - .../api/Support/ConnectivityStatus.cs | 102 - .../api/Support/CreatedByType.Completer.cs | 47 - .../Support/CreatedByType.TypeConverter.cs | 59 - .../generated/api/Support/CreatedByType.cs | 102 - .../Support/LastModifiedByType.Completer.cs | 47 - .../LastModifiedByType.TypeConverter.cs | 59 - .../api/Support/LastModifiedByType.cs | 102 - .../api/Support/PrivateLinkState.Completer.cs | 41 - .../Support/PrivateLinkState.TypeConverter.cs | 61 - .../generated/api/Support/PrivateLinkState.cs | 100 - .../Support/ProvisioningState.Completer.cs | 59 - .../ProvisioningState.TypeConverter.cs | 59 - .../api/Support/ProvisioningState.cs | 108 - .../Support/ResourceIdentityType.Completer.cs | 42 - .../ResourceIdentityType.TypeConverter.cs | 62 - .../api/Support/ResourceIdentityType.cs | 101 - .../GetAzConnectedKubernetesOperation_Get.cs | 112 +- ...zConnectedKubernetesUserCredential_List.cs | 119 +- ...edKubernetesUserCredential_ListExpanded.cs | 120 +- ...netesUserCredential_ListViaJsonFilePath.cs | 529 ++++ ...ernetesUserCredential_ListViaJsonString.cs | 527 ++++ .../cmdlets/GetAzConnectedKubernetes_Get.cs | 112 +- ...GetAzConnectedKubernetes_GetViaIdentity.cs | 105 +- .../cmdlets/GetAzConnectedKubernetes_List.cs | 119 +- .../cmdlets/GetAzConnectedKubernetes_List1.cs | 119 +- ...NewAzConnectedKubernetes_CreateExpanded.cs | 201 +- .../RemoveAzConnectedKubernetes_Delete.cs | 98 +- ...AzConnectedKubernetes_DeleteViaIdentity.cs | 91 +- ...SetAzConnectedKubernetes_UpdateExpanded.cs | 205 +- ...ateAzConnectedKubernetes_UpdateExpanded.cs | 126 +- ...tedKubernetes_UpdateViaIdentityExpanded.cs | 125 +- .../Attributes/ExternalDocsAttribute.cs | 30 + .../PSArgumentCompleterAttribute.cs | 52 + .../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 6 +- .../BuildTime/Cmdlets/ExportModelSurface.cs | 2 +- .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 4 +- .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 8 +- .../BuildTime/Cmdlets/ExportTestStub.cs | 211 +- .../runtime/BuildTime/MarkdownRenderer.cs | 2 +- .../BuildTime/Models/PsMarkdownTypes.cs | 43 +- .../BuildTime/Models/PsProxyOutputs.cs | 60 +- .../runtime/BuildTime/Models/PsProxyTypes.cs | 56 +- .../runtime/BuildTime/PsAttributes.cs | 15 + .../runtime/BuildTime/PsExtensions.cs | 7 + .../generated/runtime/BuildTime/PsHelpers.cs | 4 +- .../generated/runtime/Context.cs | 33 + .../generated/runtime/Events.cs | 4 +- .../generated/runtime/ISendAsync.cs | 113 + .../generated/runtime/InfoAttribute.cs | 4 + .../generated/runtime/InputHandler.cs | 22 + .../runtime/Nodes/Collections/XNodeArray.cs | 5 + .../generated/runtime/SerializationMode.cs | 8 +- .../runtime/TypeConverterExtensions.cs | 50 + .../Get-AzConnectedKubernetesOperation.ps1 | 10 +- .../internal/New-AzConnectedKubernetes.ps1 | 59 +- .../internal/ProxyCmdletDefinitions.ps1 | 158 +- .../internal/Remove-AzConnectedKubernetes.ps1 | 11 +- .../internal/Set-AzConnectedKubernetes.ps1 | 57 +- .../internal/Update-AzConnectedKubernetes.ps1 | 21 +- .../resources/README.md | 11 + .../test-module.ps1 | 10 +- 234 files changed, 9197 insertions(+), 6296 deletions(-) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AadProfile.PowerShell.cs (74%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AadProfile.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AadProfile.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AadProfile.json.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AgentError.PowerShell.cs (71%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AgentError.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AgentError.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/AgentError.json.cs (95%) delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.PowerShell.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.PowerShell.cs rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentProfile.PowerShell.cs (61%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentProfile.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentProfile.cs (72%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentProfile.json.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurations.PowerShell.cs (68%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurations.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurations.cs (76%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurations.json.cs (92%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsProtectedSettings.PowerShell.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsProtectedSettings.TypeConverter.cs (96%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsProtectedSettings.cs (90%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsProtectedSettings.dictionary.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsProtectedSettings.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsSettings.PowerShell.cs (88%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsSettings.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsSettings.cs (90%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsSettings.dictionary.cs (96%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ArcAgentryConfigurationsSettings.json.cs (95%) create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.PowerShell.cs rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedCluster.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedCluster.cs (61%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedCluster.json.cs (91%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterIdentity.PowerShell.cs (73%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterIdentity.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterIdentity.cs (84%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterIdentity.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterList.PowerShell.cs (74%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterList.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterList.cs (76%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterList.json.cs (90%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatch.PowerShell.cs (64%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatch.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatch.cs (64%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatch.json.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchProperties.PowerShell.cs (72%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchProperties.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchProperties.cs (82%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchProperties.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchTags.PowerShell.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchTags.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchTags.cs (89%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchTags.dictionary.cs (96%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPatchTags.json.cs (95%) create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.PowerShell.cs rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterProperties.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterProperties.cs (69%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterProperties.json.cs (88%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPropertiesMiscellaneousProperties.PowerShell.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPropertiesMiscellaneousProperties.TypeConverter.cs (96%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPropertiesMiscellaneousProperties.cs (88%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPropertiesMiscellaneousProperties.dictionary.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ConnectedClusterPropertiesMiscellaneousProperties.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResult.PowerShell.cs (79%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResult.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResult.cs (88%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResult.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResults.PowerShell.cs (56%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResults.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResults.cs (61%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/CredentialResults.json.cs (89%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.PowerShell.cs (79%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.cs (87%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.PowerShell.cs (66%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.cs (67%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.json.cs (88%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.PowerShell.cs (64%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.cs (59%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Gateway.PowerShell.cs (79%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Gateway.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Gateway.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Gateway.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/HybridConnectionConfig.PowerShell.cs (66%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/HybridConnectionConfig.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/HybridConnectionConfig.cs (85%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/HybridConnectionConfig.json.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ListClusterUserCredentialProperties.PowerShell.cs (74%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ListClusterUserCredentialProperties.TypeConverter.cs (96%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ListClusterUserCredentialProperties.cs (76%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/ListClusterUserCredentialProperties.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OidcIssuerProfile.PowerShell.cs (74%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OidcIssuerProfile.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OidcIssuerProfile.cs (92%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OidcIssuerProfile.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Operation.PowerShell.cs (66%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Operation.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Operation.cs (63%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/Operation.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationDisplay.PowerShell.cs (72%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationDisplay.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationDisplay.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationDisplay.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationList.PowerShell.cs (75%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationList.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationList.cs (74%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/OperationList.json.cs (91%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/Resource.PowerShell.cs (79%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/Resource.TypeConverter.cs (98%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/Resource.cs (91%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/Resource.json.cs (95%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfile.PowerShell.cs (74%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfile.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfile.cs (68%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfile.json.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfileWorkloadIdentity.PowerShell.cs (81%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfileWorkloadIdentity.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfileWorkloadIdentity.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SecurityProfileWorkloadIdentity.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemComponent.PowerShell.cs (72%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemComponent.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemComponent.cs (92%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemComponent.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemData.PowerShell.cs (62%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemData.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemData.cs (80%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20240715Preview => }/SystemData.json.cs (94%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResource.PowerShell.cs (72%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResource.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResource.cs (76%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResource.json.cs (88%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResourceTags.PowerShell.cs (89%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResourceTags.TypeConverter.cs (97%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResourceTags.cs (93%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResourceTags.dictionary.cs (96%) rename generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/{Api20 => }/TrackedResourceTags.json.cs (96%) delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs delete mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonFilePath.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonString.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Context.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InputHandler.cs create mode 100644 generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/resources/README.md diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj index eaa96e434073..f6b7fc97d562 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.csproj @@ -2,9 +2,9 @@ ConnectedKubernetes ConnectedKubernetes + ConnectedKubernetes.Autorest - diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml index e75f86d1286e..9480d7f8421c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.format.ps1xml @@ -2,155 +2,12 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity - - - - - - - - - - - - - - - - - - ClusterName - - - ResourceGroupName - - - SubscriptionId - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile#Multiple - - - - - - - - - - - - - - - Code - - - Message - - - Target - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.Resource - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.Resource - - - - - - - - - - - - Name - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResource - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResource - - - - - - - - - - - - - - - Name - - - Location - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTags - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTags - - - - - - - - - - - - Item - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile - - - - - - @@ -161,9 +18,6 @@ - - AdminGroupObjectID - EnableAzureRbac @@ -176,9 +30,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentError + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentError - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentError + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentError#Multiple @@ -216,9 +70,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile#Multiple @@ -250,9 +104,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurations + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurations - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurations + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurations#Multiple @@ -272,9 +126,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings#Multiple @@ -294,9 +148,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings#Multiple @@ -316,9 +170,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster#Multiple @@ -356,9 +210,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity#Multiple @@ -384,9 +238,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterList + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterList + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList#Multiple @@ -406,9 +260,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties#Multiple @@ -440,9 +294,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags#Multiple @@ -462,9 +316,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties#Multiple @@ -574,9 +428,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties#Multiple @@ -596,9 +450,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResult + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResult + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity#Multiple + + + + + + + + + + + + + + + + + + ClusterName + + + ResourceGroupName + + + SubscriptionId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResult + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResult#Multiple @@ -624,9 +512,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway#Multiple @@ -652,9 +574,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig#Multiple @@ -704,9 +626,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ListClusterUserCredentialProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ListClusterUserCredentialProperties - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ListClusterUserCredentialProperties + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ListClusterUserCredentialProperties#Multiple @@ -732,9 +654,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile#Multiple @@ -766,9 +688,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Operation + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Operation - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Operation + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Operation#Multiple @@ -788,9 +710,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay#Multiple @@ -828,9 +750,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationList + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationList - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationList + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationList#Multiple @@ -850,9 +772,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Resource - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Resource#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity#Multiple @@ -872,9 +816,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponent + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponent - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponent + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponent#Multiple @@ -906,9 +850,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData#Multiple @@ -957,5 +901,55 @@ + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResource#Multiple + + + + + + + + + + + + + + + Name + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags#Multiple + + + + + + + + + + + + Item + + + + + + \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 index 99fc4deda480..301b14055119 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Az.ConnectedKubernetes.psd1 @@ -11,8 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.ConnectedKubernetes.private.dll' FormatsToProcess = './Az.ConnectedKubernetes.format.ps1xml' - FunctionsToExport = 'Get-AzConnectedKubernetes', 'Get-AzConnectedKubernetesUserCredential', 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', 'Set-AzConnectedKubernetes', 'Update-AzConnectedKubernetes', '*' - AliasesToExport = '*' + FunctionsToExport = 'Get-AzConnectedKubernetes', 'Get-AzConnectedKubernetesUserCredential', 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', 'Set-AzConnectedKubernetes', 'Update-AzConnectedKubernetes' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedKubernetes' diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs index 61affcdc5dd2..22e6f3365e1c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/Properties/AssemblyInfo.cs @@ -1,28 +1,32 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the ""License""); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, +// distributed under the License is distributed on an ""AS IS"" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// ---------------------------------------------------------------------------------- +// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +// is regenerated. using System; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("Microsoft Azure Powershell - ConnectedKubernetes")] -[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] -[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] -[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] +[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ConnectedKubernetes")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.14.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.14.0")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] + + + + + -[assembly: ComVisible(false)] -[assembly: CLSCompliant(false)] -[assembly: Guid("57c436a1-0e82-42cb-a1a6-f727667af406")] -[assembly: AssemblyVersion("0.14.0")] -[assembly: AssemblyFileVersion("0.14.0")] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/check-dependencies.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) $ErrorActionPreference = 'Stop' -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1 index 7e6737533a71..fcf07d40d2e0 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetes.ps1 @@ -32,7 +32,7 @@ Get-AzConnectedKubernetes -InputObject $conAks .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes #> function Get-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -78,7 +78,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -137,6 +136,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -161,9 +169,7 @@ begin { List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List'; List1 = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -177,6 +183,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1 index 43ac8508ea22..8033e5f04905 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Get-AzConnectedKubernetesUserCredential.ps1 @@ -25,22 +25,22 @@ Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -Resource Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod Token -ClientProxy:$false .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults .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. PROPERTY : . - AuthenticationMethod : The mode of client authentication. + AuthenticationMethod : The mode of client authentication. ClientProxy : Boolean value to indicate whether the request is for client side proxy or not .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesusercredential #> function Get-AzConnectedKubernetesUserCredential { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults])] [CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -66,15 +66,14 @@ param( [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties] # . - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, [Parameter(ParameterSetName='ListExpanded', Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod] + [System.String] # The mode of client authentication. ${AuthenticationMethod}, @@ -84,6 +83,18 @@ param( # Boolean value to indicate whether the request is for client side proxy or not ${ClientProxy}, + [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Path of Json file supplied to the List operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ListViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Json string supplied to the List operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -140,6 +151,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -161,10 +181,10 @@ begin { $mapping = @{ List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_List'; ListExpanded = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListExpanded'; + ListViaJsonFilePath = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonFilePath'; + ListViaJsonString = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonString'; } - if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'ListExpanded', 'ListViaJsonFilePath', 'ListViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -178,6 +198,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1 index 672ba2724202..0ea36a5fc64a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/New-AzConnectedKubernetes.ps1 @@ -39,12 +39,21 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource. + [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource. + [Type ]: Type of the system extension + [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource. .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes #> function New-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -116,6 +125,46 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String[]] + # The list of AAD group object IDs that will have admin role of the cluster. + ${AadProfileAdminGroupObjectID}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable Azure RBAC for Kubernetes authorization. + ${AadProfileEnableAzureRbac}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The AAD tenant ID to use for authentication. + # If not specified, will use the tenant of the deployment subscription. + ${AadProfileTenantId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] + # List of arc agentry and system components errors on the cluster resource. + ${ArcAgentProfileAgentError}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Version of the Arc agents to be installed on the cluster resource + ${ArcAgentProfileDesiredAgentVersion}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] + # List of system extensions that are installed on the cluster resource. + ${ArcAgentProfileSystemComponent}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] @@ -129,9 +178,9 @@ param( ${KubeContext}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -147,35 +196,55 @@ param( # The Kubernetes distribution version on this connected cluster. ${DistributionVersion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the gateway for arc router connectivity is enabled. + ${GatewayEnabled}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. ${Infrastructure}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The kind of connected cluster. + ${Kind}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] + # This is populated only if privateLinkState is enabled. # The resource id of the private link scope this connected cluster is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -215,7 +284,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -253,14 +323,14 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Uri] - # The URI of the proxy server for host os to use + # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Management.Automation.PSCredential] - # The credential of the proxy server for host os to use + # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] @@ -295,6 +365,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -316,9 +395,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.ConnectedKubernetes.custom\New-AzConnectedKubernetes'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -332,6 +409,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1 index 0713b3726ac9..35e04c47c79a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -25,22 +25,22 @@ Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -Resource Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod Token -ClientProxy:$false .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults .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. PROPERTY : . - AuthenticationMethod : The mode of client authentication. + AuthenticationMethod : The mode of client authentication. ClientProxy : Boolean value to indicate whether the request is for client side proxy or not .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesusercredential #> function Get-AzConnectedKubernetesUserCredential { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults])] [CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -66,15 +66,14 @@ param( [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties] # . - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, [Parameter(ParameterSetName='ListExpanded', Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod] + [System.String] # The mode of client authentication. ${AuthenticationMethod}, @@ -84,6 +83,18 @@ param( # Boolean value to indicate whether the request is for client side proxy or not ${ClientProxy}, + [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Path of Json file supplied to the List operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ListViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Json string supplied to the List operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -140,6 +151,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -161,10 +181,10 @@ begin { $mapping = @{ List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_List'; ListExpanded = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListExpanded'; + ListViaJsonFilePath = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonFilePath'; + ListViaJsonString = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesUserCredential_ListViaJsonString'; } - if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'ListExpanded', 'ListViaJsonFilePath', 'ListViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -178,6 +198,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -239,7 +262,7 @@ Get-AzConnectedKubernetes -InputObject $conAks .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -254,7 +277,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes #> function Get-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -285,7 +308,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -344,6 +366,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -368,9 +399,7 @@ begin { List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List'; List1 = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -384,6 +413,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -452,12 +484,21 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource. + [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource. + [Type ]: Type of the system extension + [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource. .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes #> function New-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -529,6 +570,46 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String[]] + # The list of AAD group object IDs that will have admin role of the cluster. + ${AadProfileAdminGroupObjectID}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable Azure RBAC for Kubernetes authorization. + ${AadProfileEnableAzureRbac}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The AAD tenant ID to use for authentication. + # If not specified, will use the tenant of the deployment subscription. + ${AadProfileTenantId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] + # List of arc agentry and system components errors on the cluster resource. + ${ArcAgentProfileAgentError}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Version of the Arc agents to be installed on the cluster resource + ${ArcAgentProfileDesiredAgentVersion}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] + # List of system extensions that are installed on the cluster resource. + ${ArcAgentProfileSystemComponent}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] @@ -542,9 +623,9 @@ param( ${KubeContext}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -560,35 +641,55 @@ param( # The Kubernetes distribution version on this connected cluster. ${DistributionVersion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the gateway for arc router connectivity is enabled. + ${GatewayEnabled}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. ${Infrastructure}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The kind of connected cluster. + ${Kind}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] + # This is populated only if privateLinkState is enabled. # The resource id of the private link scope this connected cluster is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -628,7 +729,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -666,14 +768,14 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Uri] - # The URI of the proxy server for host os to use + # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Management.Automation.PSCredential] - # The credential of the proxy server for host os to use + # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] @@ -708,6 +810,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -729,9 +840,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.ConnectedKubernetes.custom\New-AzConnectedKubernetes'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -745,6 +854,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -807,7 +919,7 @@ 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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the Kubernetes cluster on which get is called. [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. @@ -932,6 +1044,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -954,9 +1075,7 @@ begin { Delete = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes'; DeleteViaIdentity = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -970,6 +1089,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1049,60 +1171,66 @@ Set-AzConnectedKubernetes -InputObject $inputObject Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource. + [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource. + [Type ]: Type of the system extension + [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource. + +ARCAGENTRYCONFIGURATION : Configuration settings for customizing the behavior of the connected cluster. + [Feature ]: Specifies the name of the feature for the configuration setting. + [ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information. + [(Any) ]: This indicates any property can be added to this object. + [Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information. + [(Any) ]: This indicates any property can be added to this object. + INPUTOBJECT : - Location : The geo-location where the resource lives AgentPublicKeyCertificate : Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. - IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster. + IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster. + [Location ]: The geo-location where the resource lives [Tag ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. - [AadProfileAdminGroupObjectID ]: The list of AAD group object IDs that will have admin role of the cluster. + [AadProfileAdminGroupObjectID >]: The list of AAD group object IDs that will have admin role of the cluster. [AadProfileEnableAzureRbac ]: Whether to enable Azure RBAC for Kubernetes authorization. [AadProfileTenantId ]: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. - [ArcAgentProfileAgentError ]: List of arc agentry and system components errors on the cluster resource. + [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. + [ArcAgentProfileAgentError >]: List of arc agentry and system components errors on the cluster resource. [ArcAgentProfileDesiredAgentVersion ]: Version of the Arc agents to be installed on the cluster resource - [ArcAgentProfileSystemComponent ]: List of system extensions that are installed on the cluster resource. + [ArcAgentProfileSystemComponent >]: List of system extensions that are installed on the cluster resource. [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource. [Type ]: Type of the system extension [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource. - [ArcAgentryConfiguration ]: Configuration settings for customizing the behavior of the connected cluster. + [ArcAgentryConfiguration >]: Configuration settings for customizing the behavior of the connected cluster. [Feature ]: Specifies the name of the feature for the configuration setting. [ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information. [(Any) ]: This indicates any property can be added to this object. [Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information. [(Any) ]: This indicates any property can be added to this object. - [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in + [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in [Distribution ]: The Kubernetes distribution running on this connected cluster. [DistributionVersion ]: The Kubernetes distribution version on this connected cluster. [GatewayEnabled ]: Indicates whether the gateway for arc router connectivity is enabled. [GatewayResourceId ]: The resource ID of the gateway used for the Arc router feature. [Infrastructure ]: The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. - [Kind ]: The kind of connected cluster. + [Kind ]: The kind of connected cluster. [OidcIssuerProfileEnabled ]: Whether to enable oidc issuer for workload identity integration. [OidcIssuerProfileSelfHostedIssuerUrl ]: The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature. [PrivateLinkScopeResourceId ]: This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any. - [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource. - [ProvisioningState ]: Provisioning state of the connected cluster resource. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource modification (UTC). - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource. + [ProvisioningState ]: Provisioning state of the connected cluster resource. [WorkloadIdentityEnabled ]: Whether to enable or disable the workload identity Webhook .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/set-azconnectedkubernetes #> function Set-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -1130,66 +1258,79 @@ param( # The ID of the target subscription. ${SubscriptionId}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Nullable[System.Boolean]] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)] + [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.Uri] - # The http URI of the proxy server for the kubernetes cluster to use - ${HttpProxy}, + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String[]] + # The list of AAD group object IDs that will have admin role of the cluster. + ${AadProfileAdminGroupObjectID}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.Uri] - # The https URI of the proxy server for the kubernetes cluster to use - ${HttpsProxy}, + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable Azure RBAC for Kubernetes authorization. + ${AadProfileEnableAzureRbac}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] - # The comma-separated list of hostnames that should be excluded from the proxy server for the kubernetes cluster to use - ${NoProxy}, + # The AAD tenant ID to use for authentication. + # If not specified, will use the tenant of the deployment subscription. + ${AadProfileTenantId}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] - # The path to the certificate file for proxy or custom Certificate Authority. - ${ProxyCert}, + # Indicates whether the Arc agents on the be upgraded automatically to the latest version. + # Defaults to Enabled. + ${ArcAgentProfileAgentAutoUpgrade}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.Management.Automation.SwitchParameter] - # Flag to disable auto upgrade of arc agents. - ${DisableAutoUpgrade}, + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] + # List of arc agentry and system components errors on the cluster resource. + ${ArcAgentProfileAgentError}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.String] - # Override the default container log path to enable fluent-bit logging. - ${ContainerLogPath}, - - [Parameter(ParameterSetName='SetExpanded', Mandatory)] - [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)] - [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] - # The geo-location where the resource lives - ${Location}, + # Version of the Arc agents to be installed on the cluster resource + ${ArcAgentProfileDesiredAgentVersion}, [Parameter()] + [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [System.String] - # Path to the kube config file - ${KubeConfig}, + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] + # List of system extensions that are installed on the cluster resource. + ${ArcAgentProfileSystemComponent}, [Parameter()] + [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [System.String] - # Kubconfig context from current machine - ${KubeContext}, + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]] + # Configuration settings for customizing the behavior of the connected cluster. + ${ArcAgentryConfiguration}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -1205,35 +1346,49 @@ param( # The Kubernetes distribution version on this connected cluster. ${DistributionVersion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the gateway for arc router connectivity is enabled. + ${GatewayEnabled}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. ${Infrastructure}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The kind of connected cluster. + ${Kind}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] + # This is populated only if privateLinkState is enabled. # The resource id of the private link scope this connected cluster is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -1259,7 +1414,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.Management.Automation.SwitchParameter] - # Enable the workload identity Webhook + # Whether to enable or disable the workload identity Webhook ${WorkloadIdentityEnabled}, [Parameter()] @@ -1297,8 +1452,8 @@ param( [Parameter(ParameterSetName='SetDisableGateway', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster] - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster] + # ${InputObject}, [Parameter()] @@ -1306,7 +1461,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -1344,14 +1500,14 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Uri] - # The URI of the proxy server for host os to use + # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Management.Automation.PSCredential] - # The credential of the proxy server for host os to use + # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] @@ -1368,6 +1524,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1394,9 +1559,7 @@ begin { SetDisableGateway = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes'; Set = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes'; } - if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1410,6 +1573,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1470,7 +1636,7 @@ Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -1485,10 +1651,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes #> function Update-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Alias('Name')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [System.String] @@ -1496,6 +1664,8 @@ param( ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [System.String] # The name of the resource group. @@ -1503,6 +1673,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -1513,13 +1685,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -1529,31 +1701,47 @@ param( # Accept EULA of ConnectedKubernetes, legal term will pop up without this parameter provided ${AcceptEULA}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # Represents the distribution of the connected cluster ${Distribution}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # Represents the Kubernetes distribution version on this connected cluster. ${DistributionVersion}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1603,6 +1791,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1623,11 +1820,11 @@ begin { $mapping = @{ UpdateExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; + UpdateViaJsonString = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; + UpdateViaJsonFilePath = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonString', 'UpdateViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1641,6 +1838,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1 index 48c98492f24b..55aac7aa563d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Remove-AzConnectedKubernetes.ps1 @@ -33,7 +33,7 @@ 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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the Kubernetes cluster on which get is called. [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. @@ -158,6 +158,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -180,9 +189,7 @@ begin { Delete = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes'; DeleteViaIdentity = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -196,6 +203,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1 index b9df301da669..d468be8c4106 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Set-AzConnectedKubernetes.ps1 @@ -50,60 +50,66 @@ Set-AzConnectedKubernetes -InputObject $inputObject Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false .Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +ARCAGENTPROFILESYSTEMCOMPONENT : List of system extensions that are installed on the cluster resource. + [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource. + [Type ]: Type of the system extension + [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource. + +ARCAGENTRYCONFIGURATION : Configuration settings for customizing the behavior of the connected cluster. + [Feature ]: Specifies the name of the feature for the configuration setting. + [ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information. + [(Any) ]: This indicates any property can be added to this object. + [Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information. + [(Any) ]: This indicates any property can be added to this object. + INPUTOBJECT : - Location : The geo-location where the resource lives AgentPublicKeyCertificate : Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. - IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster. + IdentityType : The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster. + [Location ]: The geo-location where the resource lives [Tag ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. - [AadProfileAdminGroupObjectID ]: The list of AAD group object IDs that will have admin role of the cluster. + [AadProfileAdminGroupObjectID >]: The list of AAD group object IDs that will have admin role of the cluster. [AadProfileEnableAzureRbac ]: Whether to enable Azure RBAC for Kubernetes authorization. [AadProfileTenantId ]: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. - [ArcAgentProfileAgentError ]: List of arc agentry and system components errors on the cluster resource. + [ArcAgentProfileAgentAutoUpgrade ]: Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. + [ArcAgentProfileAgentError >]: List of arc agentry and system components errors on the cluster resource. [ArcAgentProfileDesiredAgentVersion ]: Version of the Arc agents to be installed on the cluster resource - [ArcAgentProfileSystemComponent ]: List of system extensions that are installed on the cluster resource. + [ArcAgentProfileSystemComponent >]: List of system extensions that are installed on the cluster resource. [MajorVersion ]: Major Version of the system extension that is currently installed on the cluster resource. [Type ]: Type of the system extension [UserSpecifiedVersion ]: Version of the system extension to be installed on the cluster resource. - [ArcAgentryConfiguration ]: Configuration settings for customizing the behavior of the connected cluster. + [ArcAgentryConfiguration >]: Configuration settings for customizing the behavior of the connected cluster. [Feature ]: Specifies the name of the feature for the configuration setting. [ProtectedSetting ]: The configuration settings for the feature that contain any sensitive or secret information. [(Any) ]: This indicates any property can be added to this object. [Setting ]: The configuration settings for the feature that do not contain any sensitive or secret information. [(Any) ]: This indicates any property can be added to this object. - [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in + [AzureHybridBenefit ]: Indicates whether Azure Hybrid Benefit is opted in [Distribution ]: The Kubernetes distribution running on this connected cluster. [DistributionVersion ]: The Kubernetes distribution version on this connected cluster. [GatewayEnabled ]: Indicates whether the gateway for arc router connectivity is enabled. [GatewayResourceId ]: The resource ID of the gateway used for the Arc router feature. [Infrastructure ]: The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. - [Kind ]: The kind of connected cluster. + [Kind ]: The kind of connected cluster. [OidcIssuerProfileEnabled ]: Whether to enable oidc issuer for workload identity integration. [OidcIssuerProfileSelfHostedIssuerUrl ]: The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature. [PrivateLinkScopeResourceId ]: This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any. - [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource. - [ProvisioningState ]: Provisioning state of the connected cluster resource. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource modification (UTC). - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [PrivateLinkState ]: Property which describes the state of private link on a connected cluster resource. + [ProvisioningState ]: Provisioning state of the connected cluster resource. [WorkloadIdentityEnabled ]: Whether to enable or disable the workload identity Webhook .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/set-azconnectedkubernetes #> function Set-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -131,66 +137,79 @@ param( # The ID of the target subscription. ${SubscriptionId}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Nullable[System.Boolean]] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)] + [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.Uri] - # The http URI of the proxy server for the kubernetes cluster to use - ${HttpProxy}, + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String[]] + # The list of AAD group object IDs that will have admin role of the cluster. + ${AadProfileAdminGroupObjectID}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.Uri] - # The https URI of the proxy server for the kubernetes cluster to use - ${HttpsProxy}, + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable Azure RBAC for Kubernetes authorization. + ${AadProfileEnableAzureRbac}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] - # The comma-separated list of hostnames that should be excluded from the proxy server for the kubernetes cluster to use - ${NoProxy}, + # The AAD tenant ID to use for authentication. + # If not specified, will use the tenant of the deployment subscription. + ${AadProfileTenantId}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] - # The path to the certificate file for proxy or custom Certificate Authority. - ${ProxyCert}, + # Indicates whether the Arc agents on the be upgraded automatically to the latest version. + # Defaults to Enabled. + ${ArcAgentProfileAgentAutoUpgrade}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.Management.Automation.SwitchParameter] - # Flag to disable auto upgrade of arc agents. - ${DisableAutoUpgrade}, + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] + # List of arc agentry and system components errors on the cluster resource. + ${ArcAgentProfileAgentError}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] - [System.String] - # Override the default container log path to enable fluent-bit logging. - ${ContainerLogPath}, - - [Parameter(ParameterSetName='SetExpanded', Mandatory)] - [Parameter(ParameterSetName='SetExpandedEnableGateway', Mandatory)] - [Parameter(ParameterSetName='SetExpandedDisableGateway', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] - # The geo-location where the resource lives - ${Location}, + # Version of the Arc agents to be installed on the cluster resource + ${ArcAgentProfileDesiredAgentVersion}, [Parameter()] + [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [System.String] - # Path to the kube config file - ${KubeConfig}, + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] + # List of system extensions that are installed on the cluster resource. + ${ArcAgentProfileSystemComponent}, [Parameter()] + [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [System.String] - # Kubconfig context from current machine - ${KubeContext}, + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]] + # Configuration settings for customizing the behavior of the connected cluster. + ${ArcAgentryConfiguration}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -206,35 +225,49 @@ param( # The Kubernetes distribution version on this connected cluster. ${DistributionVersion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the gateway for arc router connectivity is enabled. + ${GatewayEnabled}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. ${Infrastructure}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # The kind of connected cluster. + ${Kind}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] + # This is populated only if privateLinkState is enabled. # The resource id of the private link scope this connected cluster is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -260,7 +293,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.Management.Automation.SwitchParameter] - # Enable the workload identity Webhook + # Whether to enable or disable the workload identity Webhook ${WorkloadIdentityEnabled}, [Parameter()] @@ -298,8 +331,8 @@ param( [Parameter(ParameterSetName='SetDisableGateway', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster] - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster] + # ${InputObject}, [Parameter()] @@ -307,7 +340,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -345,14 +379,14 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Uri] - # The URI of the proxy server for host os to use + # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')] [System.Management.Automation.PSCredential] - # The credential of the proxy server for host os to use + # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] @@ -369,6 +403,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -395,9 +438,7 @@ begin { SetDisableGateway = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes'; Set = 'Az.ConnectedKubernetes.custom\Set-AzConnectedKubernetes'; } - if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('SetExpanded', 'SetExpandedEnableGateway', 'SetExpandedDisableGateway', 'SetEnableGateway', 'SetDisableGateway', 'Set') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -411,6 +452,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1 index 3685febd472f..eeadaf1507d7 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/exports/Update-AzConnectedKubernetes.ps1 @@ -31,7 +31,7 @@ Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -46,10 +46,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes #> function Update-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Alias('Name')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [System.String] @@ -57,6 +59,8 @@ param( ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [System.String] # The name of the resource group. @@ -64,6 +68,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -74,13 +80,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -90,31 +96,47 @@ param( # Accept EULA of ConnectedKubernetes, legal term will pop up without this parameter provided ${AcceptEULA}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # Represents the distribution of the connected cluster ${Distribution}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] # Represents the Kubernetes distribution version on this connected cluster. ${DistributionVersion}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -164,6 +186,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -184,11 +215,11 @@ begin { $mapping = @{ UpdateExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; + UpdateViaJsonString = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; + UpdateViaJsonFilePath = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonString', 'UpdateViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -202,6 +233,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json index cc5eb60bd359..c8253cebc8ca 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "24497465-e141-4709-bc7e-6d0fb8c455b8" + "generate_Id": "f29daa0d-6315-4b6d-bde7-fcfac0b81b46" } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs index 3ab774f5977f..8419ffab11c0 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/Module.cs @@ -28,12 +28,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -56,11 +64,8 @@ public partial class Module /// The delegate to get the telemetry info. public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module public string Name => @"Az.ConnectedKubernetes"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeli /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs index d53e499d3b6a..a894511e83ef 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/ConnectedKubernetes.cs @@ -15,7 +15,7 @@ public partial class ConnectedKubernetes { /// - /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -26,10 +26,11 @@ public partial class ConnectedKubernetes /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -56,16 +57,16 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ConnectedClusterCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). /// /// /// Parameters supplied to Create a Connected Cluster. @@ -74,10 +75,11 @@ public partial class ConnectedKubernetes /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -116,25 +118,1344 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ConnectedClusterCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). + /// + /// + /// Parameters supplied to Create a Connected Cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// Json string supplied to the ConnectedClusterCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// Json string supplied to the ConnectedClusterCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// Parameters supplied to Create a Connected Cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + 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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + 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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// Parameters supplied to Create a Connected Cluster. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + 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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// + /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster + /// details. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster + /// details. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster + /// details. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster + /// details. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterGetWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// API to enumerate registered connected K8s clusters under a Resource Group + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// API to enumerate registered connected K8s clusters under a Resource Group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// API to enumerate registered connected K8s clusters under a Resource Group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// API to enumerate registered connected K8s clusters under a Resource Group + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -142,105 +1463,74 @@ public partial class ConnectedKubernetes try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (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.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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) + default: { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - 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. + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response); + else + { + throw new global::System.Exception($"[{code}] : {message}"); } } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -248,13 +1538,13 @@ public partial class ConnectedKubernetes case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -270,18 +1560,16 @@ public partial class ConnectedKubernetes } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Kubernetes cluster on which get is called. - /// Parameters supplied to Create a Connected Cluster. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -290,20 +1578,12 @@ public partial class ConnectedKubernetes await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). - /// + /// API to enumerate registered connected K8s clusters under a Subscription /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Kubernetes cluster on which get is called. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -311,7 +1591,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -321,10 +1601,7 @@ public partial class ConnectedKubernetes var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourcegroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Kubernetes/connectedClusters/" - + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.Kubernetes/connectedClusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -333,21 +1610,18 @@ public partial class ConnectedKubernetes // 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.ConnectedKubernetes.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ConnectedClusterListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). - /// + /// API to enumerate registered connected K8s clusters under a Subscription /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 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. @@ -355,7 +1629,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -363,53 +1637,129 @@ public partial class ConnectedKubernetes { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId - + "/resourcegroups/" - + resourceGroupName - + "/providers/Microsoft.Kubernetes/connectedClusters/" - + clusterName + + subscriptionId + + "/providers/Microsoft.Kubernetes/connectedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// API to enumerate registered connected K8s clusters under a Subscription + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Kubernetes/connectedClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// API to enumerate registered connected K8s clusters under a Subscription + /// The ID of the target subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Kubernetes/connectedClusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ConnectedClusterDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.ConnectedClusterListBySubscriptionWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -417,106 +1767,72 @@ public partial class ConnectedKubernetes try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (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.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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) + default: { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - 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. + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException(_response); + else + { + throw new global::System.Exception($"[{code}] : {message}"); } } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -524,19 +1840,13 @@ public partial class ConnectedKubernetes case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -552,45 +1862,40 @@ public partial class ConnectedKubernetes } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Kubernetes cluster on which get is called. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); } } /// - /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster - /// details. + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Kubernetes cluster on which get is called. + /// ListClusterUserCredential properties /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -604,6 +1909,7 @@ public partial class ConnectedKubernetes + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Kubernetes/connectedClusters/" + global::System.Uri.EscapeDataString(clusterName) + + "/listClusterUserCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -612,29 +1918,34 @@ public partial class ConnectedKubernetes // 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.ConnectedKubernetes.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ConnectedClusterListClusterUserCredential_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster - /// details. + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. /// /// + /// ListClusterUserCredential properties /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -660,6 +1971,7 @@ public partial class ConnectedKubernetes + resourceGroupName + "/providers/Microsoft.Kubernetes/connectedClusters/" + clusterName + + "/listClusterUserCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -668,100 +1980,144 @@ public partial class ConnectedKubernetes // 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.ConnectedKubernetes.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ConnectedClusterListClusterUserCredential_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). + /// + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. + /// + /// + /// ListClusterUserCredential properties /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + clusterName + + "/listClusterUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterListClusterUserCredentialWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Kubernetes cluster on which get is called. + /// Json string supplied to the ConnectedClusterListClusterUserCredential operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters 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(clusterName),clusterName); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/listClusterUserCredential" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectedClusterListClusterUserCredential_Call (request, onOk,onDefault,eventListener,sender); } } - /// API to enumerate registered connected K8s clusters under a Resource Group + /// + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The name of the Kubernetes cluster on which get is called. + /// Json string supplied to the ConnectedClusterListClusterUserCredential operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -773,86 +2129,91 @@ public partial class ConnectedKubernetes + global::System.Uri.EscapeDataString(subscriptionId) + "/resourcegroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Kubernetes/connectedClusters" + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/listClusterUserCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ConnectedClusterListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConnectedClusterListClusterUserCredentialWithResult_Call (request, eventListener,sender); } } - /// API to enumerate registered connected K8s clusters under a Resource Group - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// ListClusterUserCredential properties /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourcegroups/" - + resourceGroupName - + "/providers/Microsoft.Kubernetes/connectedClusters" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/listClusterUserCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ConnectedClusterListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConnectedClusterListClusterUserCredentialWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -860,24 +2221,37 @@ public partial class ConnectedKubernetes try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { case global::System.Net.HttpStatusCode.OK: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } } @@ -892,114 +2266,8 @@ public partial class ConnectedKubernetes } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Actual wire call for method. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ConnectedClusterListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - } - } - - /// API to enumerate registered connected K8s clusters under a Subscription - /// The ID of the target subscription. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-07-15-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.Kubernetes/connectedClusters" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ConnectedClusterListBySubscription_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// API to enumerate registered connected K8s clusters under a Subscription - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ConnectedClusterListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-07-15-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/providers/Microsoft.Kubernetes/connectedClusters" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, 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.ConnectedKubernetes.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ConnectedClusterListBySubscription_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1009,7 +2277,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1020,6 +2288,7 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1027,13 +2296,13 @@ public partial class ConnectedKubernetes case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1049,39 +2318,47 @@ public partial class ConnectedKubernetes } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// ListClusterUserCredential properties /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Gets cluster user credentials of the connected cluster with a specified resource group and name. - /// + /// API to update certain properties of the connected cluster resource /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Kubernetes cluster on which get is called. - /// ListClusterUserCredential properties + /// Parameters supplied to update Connected Cluster. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -1095,7 +2372,6 @@ public partial class ConnectedKubernetes + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Kubernetes/connectedClusters/" + global::System.Uri.EscapeDataString(clusterName) - + "/listClusterUserCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1104,33 +2380,32 @@ public partial class ConnectedKubernetes // 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.ConnectedKubernetes.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterListClusterUserCredential_Call(request,onOk,onDefault,eventListener,sender); + await this.ConnectedClusterUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Gets cluster user credentials of the connected cluster with a specified resource group and name. - /// + /// API to update certain properties of the connected cluster resource /// - /// ListClusterUserCredential properties + /// Parameters supplied to update Connected Cluster. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredentialViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -1141,7 +2416,7 @@ public partial class ConnectedKubernetes var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); } // replace URI parameters with values from identity @@ -1156,7 +2431,6 @@ public partial class ConnectedKubernetes + resourceGroupName + "/providers/Microsoft.Kubernetes/connectedClusters/" + clusterName - + "/listClusterUserCredential" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1165,94 +2439,73 @@ public partial class ConnectedKubernetes // 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.ConnectedKubernetes.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterListClusterUserCredential_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// - /// Actual wire call for method. - /// - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await this.ConnectedClusterUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Kubernetes cluster on which get is called. - /// ListClusterUserCredential properties + /// API to update certain properties of the connected cluster resource + /// + /// Parameters supplied to update Connected Cluster. /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterListClusterUserCredential_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task ConnectedClusterUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters 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(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourcegroups/" + + resourceGroupName + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterUpdateWithResult_Call (request, eventListener,sender); } } @@ -1260,7 +2513,7 @@ public partial class ConnectedKubernetes /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Kubernetes cluster on which get is called. - /// Parameters supplied to update Connected Cluster. + /// Json string supplied to the ConnectedClusterUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1269,7 +2522,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -1296,73 +2549,168 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectedClusterUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ConnectedClusterUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// API to update certain properties of the connected cluster resource - /// - /// Parameters supplied to update Connected Cluster. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// Json string supplied to the ConnectedClusterUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectedClusterUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectedClusterUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourcegroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Kubernetes/connectedClusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourcegroups/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'"); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; + // 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.ConnectedKubernetes.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectedClusterUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// API to update certain properties of the connected cluster resource + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster on which get is called. + /// Parameters supplied to update Connected Cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectedClusterUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourcegroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Kubernetes/connectedClusters/" - + clusterName + + global::System.Uri.EscapeDataString(clusterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ConnectedClusterUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConnectedClusterUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectedClusterUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1372,7 +2720,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConnectedClusterUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1383,6 +2731,7 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1390,13 +2739,13 @@ public partial class ConnectedKubernetes case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1423,7 +2772,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectedClusterUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConnectedClusterUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1447,7 +2796,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsGet(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsGet(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -1469,7 +2818,7 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsGet_Call (request, onOk,onDefault,eventListener,sender); } } @@ -1483,7 +2832,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { var apiVersion = @"2024-07-15-preview"; // Constant Parameters @@ -1514,11 +2863,147 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the available API operations for Connected Cluster resource. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Kubernetes/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Kubernetes/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Kubernetes/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the available API operations for Connected Cluster resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsGetWithResult(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-07-15-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Kubernetes/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1528,7 +3013,7 @@ public partial class ConnectedKubernetes /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1539,6 +3024,7 @@ public partial class ConnectedKubernetes await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1546,13 +3032,13 @@ public partial class ConnectedKubernetes case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.PowerShell.cs similarity index 74% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.PowerShell.cs index c540ebdc5902..87d65777accb 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AadProfile partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal AadProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("EnableAzureRbac")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("AdminGroupObjectID")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).AdminGroupObjectID = (string[]) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).AdminGroupObjectID = (System.Collections.Generic.List) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).TenantId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal AadProfile(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("EnableAzureRbac")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("AdminGroupObjectID")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).AdminGroupObjectID = (string[]) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).AdminGroupObjectID = (System.Collections.Generic.List) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)this).TenantId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AadProfile(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.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AadProfile(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.TypeConverter.cs index a33dec12269e..8235e8eabbd4 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.cs index 5c5a552410ab..4beaedccc87b 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// AAD Profile specifies attributes for Azure Active Directory integration. public partial class AadProfile : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal { /// Backing field for property. - private string[] _adminGroupObjectID; + private System.Collections.Generic.List _adminGroupObjectID; /// The list of AAD group object IDs that will have admin role of the cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public string[] AdminGroupObjectID { get => this._adminGroupObjectID; set => this._adminGroupObjectID = value; } + public System.Collections.Generic.List AdminGroupObjectID { get => this._adminGroupObjectID; set => this._adminGroupObjectID = value; } /// Backing field for property. private bool? _enableAzureRbac; @@ -50,14 +50,20 @@ public partial interface IAadProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of AAD group object IDs that will have admin role of the cluster.", SerializedName = @"adminGroupObjectIDs", PossibleTypes = new [] { typeof(string) })] - string[] AdminGroupObjectID { get; set; } + System.Collections.Generic.List AdminGroupObjectID { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", SerializedName = @"enableAzureRBAC", PossibleTypes = new [] { typeof(bool) })] @@ -68,6 +74,9 @@ public partial interface IAadProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", SerializedName = @"tenantID", PossibleTypes = new [] { typeof(string) })] @@ -79,7 +88,7 @@ internal partial interface IAadProfileInternal { /// The list of AAD group object IDs that will have admin role of the cluster. - string[] AdminGroupObjectID { get; set; } + System.Collections.Generic.List AdminGroupObjectID { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. bool? EnableAzureRbac { get; set; } /// diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.json.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.json.cs index 19a187eb4a9b..111c122fd395 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AadProfile.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AadProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AadProfile(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runti { return; } - {_enableAzureRbac = If( json?.PropertyT("enableAzureRBAC"), out var __jsonEnableAzureRbac) ? (bool?)__jsonEnableAzureRbac : EnableAzureRbac;} - {_adminGroupObjectID = If( json?.PropertyT("adminGroupObjectIDs"), out var __jsonAdminGroupObjectIDs) ? If( __jsonAdminGroupObjectIDs as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AdminGroupObjectID;} - {_tenantId = If( json?.PropertyT("tenantID"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} + {_enableAzureRbac = If( json?.PropertyT("enableAzureRBAC"), out var __jsonEnableAzureRbac) ? (bool?)__jsonEnableAzureRbac : _enableAzureRbac;} + {_adminGroupObjectID = If( json?.PropertyT("adminGroupObjectIDs"), out var __jsonAdminGroupObjectIDs) ? If( __jsonAdminGroupObjectIDs as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _adminGroupObjectID;} + {_tenantId = If( json?.PropertyT("tenantID"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new AadProfile(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.PowerShell.cs similarity index 71% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.PowerShell.cs index 68eaa45cc345..c061bfa1c220 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AgentError partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,25 +78,25 @@ internal AgentError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Severity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Severity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Severity, global::System.Convert.ToString); } if (content.Contains("Component")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Component, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Component, global::System.Convert.ToString); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -111,47 +111,45 @@ internal AgentError(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Severity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Severity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Severity = (string) content.GetValueForProperty("Severity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Severity, global::System.Convert.ToString); } if (content.Contains("Component")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Component, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Component, global::System.Convert.ToString); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Time = (global::System.DateTime?) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal)this).Time, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentError(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.ConnectedKubernetes.Models.Api20240715Preview.IAgentError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentError(content); } @@ -161,7 +159,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.TypeConverter.cs index a12dee9ecbad..c9282c339227 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.cs index 343027f9e05a..be8121c26d26 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Agent Errors if any during agent or system component upgrade. public partial class AgentError : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal { /// Backing field for property. @@ -28,16 +28,16 @@ public partial class AgentError : public string Message { get => this._message; } /// Internal Acessors for Component - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal.Component { get => this._component; set { {_component = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal.Component { get => this._component; set { {_component = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Severity - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal.Severity { get => this._severity; set { {_severity = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal.Severity { get => this._severity; set { {_severity = value;} } } /// Internal Acessors for Time - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentErrorInternal.Time { get => this._time; set { {_time = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentErrorInternal.Time { get => this._time; set { {_time = value;} } } /// Backing field for property. private string _severity; @@ -67,6 +67,9 @@ public partial interface IAgentError : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Agent component where error message occured.", SerializedName = @"component", PossibleTypes = new [] { typeof(string) })] @@ -75,6 +78,9 @@ public partial interface IAgentError : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Agent error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -83,6 +89,9 @@ public partial interface IAgentError : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Severity of the error message.", SerializedName = @"severity", PossibleTypes = new [] { typeof(string) })] @@ -91,6 +100,9 @@ public partial interface IAgentError : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of error occured (UTC).", SerializedName = @"time", PossibleTypes = new [] { typeof(global::System.DateTime) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.json.cs index cb23562f82ad..69f9e108492f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/AgentError.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/AgentError.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,21 +65,21 @@ internal AgentError(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runti { return; } - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_severity = If( json?.PropertyT("severity"), out var __jsonSeverity) ? (string)__jsonSeverity : (string)Severity;} - {_component = If( json?.PropertyT("component"), out var __jsonComponent) ? (string)__jsonComponent : (string)Component;} - {_time = If( json?.PropertyT("time"), out var __jsonTime) ? global::System.DateTime.TryParse((string)__jsonTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeValue) ? __jsonTimeValue : Time : Time;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_severity = If( json?.PropertyT("severity"), out var __jsonSeverity) ? (string)__jsonSeverity : (string)_severity;} + {_component = If( json?.PropertyT("component"), out var __jsonComponent) ? (string)__jsonComponent : (string)_component;} + {_time = If( json?.PropertyT("time"), out var __jsonTime) ? global::System.DateTime.TryParse((string)__jsonTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeValue) ? __jsonTimeValue : _time : _time;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new AgentError(json) : null; } @@ -103,19 +103,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._severity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._severity.ToString()) : null, "severity" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._component)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._component.ToString()) : null, "component" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._time ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._time?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "time" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.PowerShell.cs index ed1a015133e0..e5a1eeed75e5 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial class Any { @@ -146,7 +146,7 @@ public override string ToString() return ToJsonString(); } } - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial interface IAny diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.cs index 8c911a3f6cc6..47199f78c945 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.json.cs index 74d80b0e1911..c3cb4f7d0632 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.PowerShell.cs deleted file mode 100644 index c2651d99d0b4..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.PowerShell.cs +++ /dev/null @@ -1,606 +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.ConnectedKubernetes.Models.Api20240715Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; - - /// Represents a connected cluster. - [System.ComponentModel.TypeConverter(typeof(ConnectedClusterTypeConverter))] - public partial class ConnectedCluster - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// 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 ConnectedCluster(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Kind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind?) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind.CreateFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("SecurityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("Gateway")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.GatewayTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ConnectivityStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ConnectivityStatus = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus?) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ConnectivityStatus, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)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("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("ArcAgentProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfileTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AgentPublicKeyCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("TotalNodeCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("TotalCoreCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("AgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentVersion, global::System.Convert.ToString); - } - if (content.Contains("Distribution")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Distribution, global::System.Convert.ToString); - } - if (content.Contains("DistributionVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).DistributionVersion, global::System.Convert.ToString); - } - if (content.Contains("Infrastructure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Infrastructure, global::System.Convert.ToString); - } - if (content.Contains("Offering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Offering, global::System.Convert.ToString); - } - if (content.Contains("ManagedIdentityCertificateExpirationTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastConnectivityTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PrivateLinkState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState?) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState.CreateFrom); - } - if (content.Contains("PrivateLinkScopeResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureHybridBenefit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); - } - if (content.Contains("ArcAgentryConfiguration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); - } - if (content.Contains("MiscellaneousProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileSystemComponent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponentTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentError = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); - } - if (content.Contains("SecurityProfileWorkloadIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfileIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayResourceId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)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("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ArcAgentProfileDesiredAgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions?) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions.CreateFrom); - } - if (content.Contains("OidcIssuerProfileEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("WorkloadIdentityEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).WorkloadIdentityEnabled, (__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 ConnectedCluster(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Kind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind?) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind.CreateFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("SecurityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("Gateway")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.GatewayTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ConnectivityStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ConnectivityStatus = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus?) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ConnectivityStatus, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)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("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("ArcAgentProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfileTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AgentPublicKeyCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("TotalNodeCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("TotalCoreCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("AgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AgentVersion, global::System.Convert.ToString); - } - if (content.Contains("Distribution")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Distribution, global::System.Convert.ToString); - } - if (content.Contains("DistributionVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).DistributionVersion, global::System.Convert.ToString); - } - if (content.Contains("Infrastructure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Infrastructure, global::System.Convert.ToString); - } - if (content.Contains("Offering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).Offering, global::System.Convert.ToString); - } - if (content.Contains("ManagedIdentityCertificateExpirationTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastConnectivityTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PrivateLinkState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState?) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState.CreateFrom); - } - if (content.Contains("PrivateLinkScopeResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureHybridBenefit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); - } - if (content.Contains("ArcAgentryConfiguration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); - } - if (content.Contains("MiscellaneousProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileSystemComponent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponentTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentError = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); - } - if (content.Contains("SecurityProfileWorkloadIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfileIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayResourceId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)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("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ArcAgentProfileDesiredAgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions?) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions.CreateFrom); - } - if (content.Contains("OidcIssuerProfileEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("WorkloadIdentityEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ConnectedCluster(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ConnectedCluster(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Represents a connected cluster. - [System.ComponentModel.TypeConverter(typeof(ConnectedClusterTypeConverter))] - public partial interface IConnectedCluster - - { - - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.PowerShell.cs deleted file mode 100644 index 1f271f2ba0fe..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.PowerShell.cs +++ /dev/null @@ -1,462 +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.ConnectedKubernetes.Models.Api20240715Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; - - /// Properties of the connected cluster. - [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPropertiesTypeConverter))] - public partial class ConnectedClusterProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// 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 ConnectedClusterProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ArcAgentProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfileTypeConverter.ConvertFrom); - } - if (content.Contains("SecurityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("Gateway")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.GatewayTypeConverter.ConvertFrom); - } - if (content.Contains("AgentPublicKeyCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("TotalNodeCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("TotalCoreCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("AgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Distribution")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Distribution, global::System.Convert.ToString); - } - if (content.Contains("DistributionVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); - } - if (content.Contains("Infrastructure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Infrastructure, global::System.Convert.ToString); - } - if (content.Contains("Offering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Offering, global::System.Convert.ToString); - } - if (content.Contains("ManagedIdentityCertificateExpirationTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastConnectivityTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ConnectivityStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ConnectivityStatus = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus?) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ConnectivityStatus, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus.CreateFrom); - } - if (content.Contains("PrivateLinkState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState?) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState.CreateFrom); - } - if (content.Contains("PrivateLinkScopeResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureHybridBenefit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); - } - if (content.Contains("ArcAgentryConfiguration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); - } - if (content.Contains("MiscellaneousProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileSystemComponent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponentTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); - } - if (content.Contains("SecurityProfileWorkloadIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfileIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayResourceId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ArcAgentProfileDesiredAgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions?) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions.CreateFrom); - } - if (content.Contains("OidcIssuerProfileEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("WorkloadIdentityEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled, (__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 ConnectedClusterProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ArcAgentProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfileTypeConverter.ConvertFrom); - } - if (content.Contains("SecurityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("Gateway")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.GatewayTypeConverter.ConvertFrom); - } - if (content.Contains("AgentPublicKeyCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("TotalNodeCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("TotalCoreCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("AgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Distribution")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Distribution, global::System.Convert.ToString); - } - if (content.Contains("DistributionVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); - } - if (content.Contains("Infrastructure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Infrastructure, global::System.Convert.ToString); - } - if (content.Contains("Offering")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).Offering, global::System.Convert.ToString); - } - if (content.Contains("ManagedIdentityCertificateExpirationTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastConnectivityTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ConnectivityStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ConnectivityStatus = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus?) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ConnectivityStatus, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus.CreateFrom); - } - if (content.Contains("PrivateLinkState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState?) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState.CreateFrom); - } - if (content.Contains("PrivateLinkScopeResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureHybridBenefit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); - } - if (content.Contains("ArcAgentryConfiguration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); - } - if (content.Contains("MiscellaneousProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileSystemComponent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponentTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("ArcAgentProfileAgentState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); - } - if (content.Contains("SecurityProfileWorkloadIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("OidcIssuerProfileIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayResourceId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ArcAgentProfileDesiredAgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions?) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions.CreateFrom); - } - if (content.Contains("OidcIssuerProfileEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); - } - if (content.Contains("GatewayEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("WorkloadIdentityEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ConnectedClusterProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ConnectedClusterProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString(); - - 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 the connected cluster. - [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPropertiesTypeConverter))] - public partial interface IConnectedClusterProperties - - { - - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.PowerShell.cs similarity index 61% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.PowerShell.cs index 0f5e2cf8d351..eb5c5326c58d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ArcAgentProfile partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,29 +78,29 @@ internal ArcAgentProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("DesiredAgentVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).DesiredAgentVersion = (string) content.GetValueForProperty("DesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).DesiredAgentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).DesiredAgentVersion = (string) content.GetValueForProperty("DesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).DesiredAgentVersion, global::System.Convert.ToString); } if (content.Contains("AgentAutoUpgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentAutoUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions?) content.GetValueForProperty("AgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentAutoUpgrade, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentAutoUpgrade = (string) content.GetValueForProperty("AgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentAutoUpgrade, global::System.Convert.ToString); } if (content.Contains("SystemComponent")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).SystemComponent = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]) content.GetValueForProperty("SystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).SystemComponent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponentTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).SystemComponent = (System.Collections.Generic.List) content.GetValueForProperty("SystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).SystemComponent, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponentTypeConverter.ConvertFrom)); } if (content.Contains("AgentError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentError = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]) content.GetValueForProperty("AgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentError = (System.Collections.Generic.List) content.GetValueForProperty("AgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentError, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentErrorTypeConverter.ConvertFrom)); } if (content.Contains("AgentState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentState = (string) content.GetValueForProperty("AgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentState = (string) content.GetValueForProperty("AgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentState, 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. @@ -115,51 +115,49 @@ internal ArcAgentProfile(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("DesiredAgentVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).DesiredAgentVersion = (string) content.GetValueForProperty("DesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).DesiredAgentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).DesiredAgentVersion = (string) content.GetValueForProperty("DesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).DesiredAgentVersion, global::System.Convert.ToString); } if (content.Contains("AgentAutoUpgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentAutoUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions?) content.GetValueForProperty("AgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentAutoUpgrade, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentAutoUpgrade = (string) content.GetValueForProperty("AgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentAutoUpgrade, global::System.Convert.ToString); } if (content.Contains("SystemComponent")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).SystemComponent = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]) content.GetValueForProperty("SystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).SystemComponent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponentTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).SystemComponent = (System.Collections.Generic.List) content.GetValueForProperty("SystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).SystemComponent, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponentTypeConverter.ConvertFrom)); } if (content.Contains("AgentError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentError = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]) content.GetValueForProperty("AgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentError = (System.Collections.Generic.List) content.GetValueForProperty("AgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentError, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentErrorTypeConverter.ConvertFrom)); } if (content.Contains("AgentState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentState = (string) content.GetValueForProperty("AgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)this).AgentState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentState = (string) content.GetValueForProperty("AgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)this).AgentState, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArcAgentProfile(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.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArcAgentProfile(content); } @@ -169,7 +167,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.TypeConverter.cs index 950ee1f2474a..5d04ada6bb94 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.cs similarity index 72% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.cs index 4fc5849a0cfc..65cebd9f53bb 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.cs @@ -3,31 +3,31 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Defines the Arc Agent properties for the clusters. public partial class ArcAgentProfile : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? _agentAutoUpgrade; + private string _agentAutoUpgrade; /// /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? AgentAutoUpgrade { get => this._agentAutoUpgrade; set => this._agentAutoUpgrade = value; } + public string AgentAutoUpgrade { get => this._agentAutoUpgrade; set => this._agentAutoUpgrade = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] _agentError; + private System.Collections.Generic.List _agentError; /// List of arc agentry and system components errors on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] AgentError { get => this._agentError; set => this._agentError = value; } + public System.Collections.Generic.List AgentError { get => this._agentError; set => this._agentError = value; } /// Backing field for property. private string _agentState; @@ -44,14 +44,14 @@ public partial class ArcAgentProfile : public string DesiredAgentVersion { get => this._desiredAgentVersion; set => this._desiredAgentVersion = value; } /// Internal Acessors for AgentState - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal.AgentState { get => this._agentState; set { {_agentState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal.AgentState { get => this._agentState; set { {_agentState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] _systemComponent; + private System.Collections.Generic.List _systemComponent; /// List of system extensions that are installed on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] SystemComponent { get => this._systemComponent; set => this._systemComponent = value; } + public System.Collections.Generic.List SystemComponent { get => this._systemComponent; set => this._systemComponent = value; } /// Creates an new instance. public ArcAgentProfile() @@ -69,22 +69,32 @@ public partial interface IArcAgentProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.", SerializedName = @"agentAutoUpgrade", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? AgentAutoUpgrade { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AgentAutoUpgrade { get; set; } /// List of arc agentry and system components errors on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of arc agentry and system components errors on the cluster resource.", SerializedName = @"agentErrors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] AgentError { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError) })] + System.Collections.Generic.List AgentError { get; set; } /// Represents the current state of the Arc agentry and its dependent components. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the current state of the Arc agentry and its dependent components.", SerializedName = @"agentState", PossibleTypes = new [] { typeof(string) })] @@ -93,6 +103,9 @@ public partial interface IArcAgentProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the Arc agents to be installed on the cluster resource", SerializedName = @"desiredAgentVersion", PossibleTypes = new [] { typeof(string) })] @@ -101,10 +114,13 @@ public partial interface IArcAgentProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of system extensions that are installed on the cluster resource.", SerializedName = @"systemComponents", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] SystemComponent { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent) })] + System.Collections.Generic.List SystemComponent { get; set; } } /// Defines the Arc Agent properties for the clusters. @@ -114,15 +130,16 @@ internal partial interface IArcAgentProfileInternal /// /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? AgentAutoUpgrade { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string AgentAutoUpgrade { get; set; } /// List of arc agentry and system components errors on the cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] AgentError { get; set; } + System.Collections.Generic.List AgentError { get; set; } /// Represents the current state of the Arc agentry and its dependent components. string AgentState { get; set; } /// Version of the Arc agents to be installed on the cluster resource string DesiredAgentVersion { get; set; } /// List of system extensions that are installed on the cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] SystemComponent { get; set; } + System.Collections.Generic.List SystemComponent { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.json.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.json.cs index a7df01c293ab..49702723c5f7 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentProfile.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ArcAgentProfile(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes. { return; } - {_desiredAgentVersion = If( json?.PropertyT("desiredAgentVersion"), out var __jsonDesiredAgentVersion) ? (string)__jsonDesiredAgentVersion : (string)DesiredAgentVersion;} - {_agentAutoUpgrade = If( json?.PropertyT("agentAutoUpgrade"), out var __jsonAgentAutoUpgrade) ? (string)__jsonAgentAutoUpgrade : (string)AgentAutoUpgrade;} - {_systemComponent = If( json?.PropertyT("systemComponents"), out var __jsonSystemComponents) ? If( __jsonSystemComponents as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemComponent.FromJson(__u) )) ))() : null : SystemComponent;} - {_agentError = If( json?.PropertyT("agentErrors"), out var __jsonAgentErrors) ? If( __jsonAgentErrors as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AgentError.FromJson(__p) )) ))() : null : AgentError;} - {_agentState = If( json?.PropertyT("agentState"), out var __jsonAgentState) ? (string)__jsonAgentState : (string)AgentState;} + {_desiredAgentVersion = If( json?.PropertyT("desiredAgentVersion"), out var __jsonDesiredAgentVersion) ? (string)__jsonDesiredAgentVersion : (string)_desiredAgentVersion;} + {_agentAutoUpgrade = If( json?.PropertyT("agentAutoUpgrade"), out var __jsonAgentAutoUpgrade) ? (string)__jsonAgentAutoUpgrade : (string)_agentAutoUpgrade;} + {_systemComponent = If( json?.PropertyT("systemComponents"), out var __jsonSystemComponents) ? If( __jsonSystemComponents as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponent.FromJson(__u) )) ))() : null : _systemComponent;} + {_agentError = If( json?.PropertyT("agentErrors"), out var __jsonAgentErrors) ? If( __jsonAgentErrors as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentError.FromJson(__p) )) ))() : null : _agentError;} + {_agentState = If( json?.PropertyT("agentState"), out var __jsonAgentState) ? (string)__jsonAgentState : (string)_agentState;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ArcAgentProfile(json) : null; } @@ -124,7 +124,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN } container.Add("agentErrors",__r); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._agentState.ToString()) : null, "agentState" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.PowerShell.cs similarity index 68% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.PowerShell.cs index 7b868307d2d0..ee3346a35499 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -62,7 +62,7 @@ public partial class ArcAgentryConfigurations 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. @@ -77,21 +77,21 @@ internal ArcAgentryConfigurations(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Feature")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Feature = (string) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Feature, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Feature = (string) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Feature, global::System.Convert.ToString); } if (content.Contains("Setting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Setting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings) content.GetValueForProperty("Setting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Setting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Setting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings) content.GetValueForProperty("Setting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Setting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettingsTypeConverter.ConvertFrom); } if (content.Contains("ProtectedSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).ProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings) content.GetValueForProperty("ProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).ProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).ProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings) content.GetValueForProperty("ProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).ProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettingsTypeConverter.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. @@ -106,43 +106,41 @@ internal ArcAgentryConfigurations(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Feature")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Feature = (string) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Feature, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Feature = (string) content.GetValueForProperty("Feature",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Feature, global::System.Convert.ToString); } if (content.Contains("Setting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Setting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings) content.GetValueForProperty("Setting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).Setting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Setting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings) content.GetValueForProperty("Setting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).Setting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettingsTypeConverter.ConvertFrom); } if (content.Contains("ProtectedSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).ProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings) content.GetValueForProperty("ProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal)this).ProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).ProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings) content.GetValueForProperty("ProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal)this).ProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettingsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArcAgentryConfigurations(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.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArcAgentryConfigurations(content); } @@ -152,7 +150,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.TypeConverter.cs index 1e9d336abedb..13aff45a1c29 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.cs similarity index 76% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.cs index a90742391abe..a936c7c25c5d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; public partial class ArcAgentryConfigurations : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsInternal { /// Backing field for property. @@ -20,22 +20,22 @@ public partial class ArcAgentryConfigurations : public string Feature { get => this._feature; set => this._feature = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings _protectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings _protectedSetting; /// /// The configuration settings for the feature that contain any sensitive or secret information. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings ProtectedSetting { get => (this._protectedSetting = this._protectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings()); set => this._protectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings ProtectedSetting { get => (this._protectedSetting = this._protectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings()); set => this._protectedSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings _setting; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings _setting; /// /// The configuration settings for the feature that do not contain any sensitive or secret information. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings Setting { get => (this._setting = this._setting ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings()); set => this._setting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings Setting { get => (this._setting = this._setting ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings()); set => this._setting = value; } /// Creates an new instance. public ArcAgentryConfigurations() @@ -50,6 +50,9 @@ public partial interface IArcAgentryConfigurations : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the name of the feature for the configuration setting.", SerializedName = @"feature", PossibleTypes = new [] { typeof(string) })] @@ -60,20 +63,26 @@ public partial interface IArcAgentryConfigurations : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The configuration settings for the feature that contain any sensitive or secret information.", SerializedName = @"protectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings ProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings ProtectedSetting { get; set; } /// /// The configuration settings for the feature that do not contain any sensitive or secret information. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The configuration settings for the feature that do not contain any sensitive or secret information.", SerializedName = @"settings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings Setting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings Setting { get; set; } } internal partial interface IArcAgentryConfigurationsInternal @@ -84,11 +93,11 @@ internal partial interface IArcAgentryConfigurationsInternal /// /// The configuration settings for the feature that contain any sensitive or secret information. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings ProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings ProtectedSetting { get; set; } /// /// The configuration settings for the feature that do not contain any sensitive or secret information. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings Setting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings Setting { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.json.cs similarity index 92% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.json.cs index de6a153f3ae3..d2ea44a2faae 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurations.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurations.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -64,20 +64,20 @@ internal ArcAgentryConfigurations(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKu { return; } - {_feature = If( json?.PropertyT("feature"), out var __jsonFeature) ? (string)__jsonFeature : (string)Feature;} - {_setting = If( json?.PropertyT("settings"), out var __jsonSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings.FromJson(__jsonSettings) : Setting;} - {_protectedSetting = If( json?.PropertyT("protectedSettings"), out var __jsonProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings.FromJson(__jsonProtectedSettings) : ProtectedSetting;} + {_feature = If( json?.PropertyT("feature"), out var __jsonFeature) ? (string)__jsonFeature : (string)_feature;} + {_setting = If( json?.PropertyT("settings"), out var __jsonSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings.FromJson(__jsonSettings) : _setting;} + {_protectedSetting = If( json?.PropertyT("protectedSettings"), out var __jsonProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings.FromJson(__jsonProtectedSettings) : _protectedSetting;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ArcAgentryConfigurations(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.PowerShell.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.PowerShell.cs index 4cd4d800ac71..b64294d89ca8 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -65,7 +65,7 @@ public partial class ArcAgentryConfigurationsProtectedSettings 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. @@ -84,7 +84,7 @@ internal ArcAgentryConfigurationsProtectedSettings(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. @@ -103,29 +103,29 @@ internal ArcAgentryConfigurationsProtectedSettings(global::System.Management.Aut } /// - /// 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.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArcAgentryConfigurationsProtectedSettings(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.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArcAgentryConfigurationsProtectedSettings(content); } @@ -138,7 +138,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.TypeConverter.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.TypeConverter.cs index ab69a52b9510..5702782fdc7a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.cs similarity index 90% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.cs index c339d8ca7fa6..53f3496320ca 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240 /// The configuration settings for the feature that contain any sensitive or secret information. /// public partial class ArcAgentryConfigurationsProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettingsInternal { /// diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.dictionary.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.dictionary.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.dictionary.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.dictionary.cs index f84d01bcade3..6cc199efa677 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.dictionary.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.json.cs index 9eb99b912283..d2e623120fe6 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsProtectedSettings.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsProtectedSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -73,13 +73,13 @@ internal ArcAgentryConfigurationsProtectedSettings(Microsoft.Azure.PowerShell.Cm } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ArcAgentryConfigurationsProtectedSettings(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.PowerShell.cs similarity index 88% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.PowerShell.cs index ff5fe119d40f..3e0b60de668f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -65,7 +65,7 @@ public partial class ArcAgentryConfigurationsSettings 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. @@ -84,7 +84,7 @@ internal ArcAgentryConfigurationsSettings(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. @@ -103,29 +103,29 @@ internal ArcAgentryConfigurationsSettings(global::System.Management.Automation.P } /// - /// 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.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArcAgentryConfigurationsSettings(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.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArcAgentryConfigurationsSettings(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.TypeConverter.cs index 02656f73cefc..4229b8c7c60e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.cs similarity index 90% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.cs index 5ad8562f41c3..901e7c72c62f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240 /// The configuration settings for the feature that do not contain any sensitive or secret information. /// public partial class ArcAgentryConfigurationsSettings : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettingsInternal { /// Creates an new instance. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.dictionary.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.dictionary.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.dictionary.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.dictionary.cs index 0b10ac597ee7..cceb6b3fcd53 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.dictionary.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurationsSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.json.cs index 3fd06c414d3a..9071c78d6e1b 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ArcAgentryConfigurationsSettings.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ArcAgentryConfigurationsSettings.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -73,13 +73,13 @@ internal ArcAgentryConfigurationsSettings(Microsoft.Azure.PowerShell.Cmdlets.Con } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurationsSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurationsSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ArcAgentryConfigurationsSettings(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.PowerShell.cs new file mode 100644 index 000000000000..a7d6d859edb8 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.PowerShell.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + + /// Represents a connected cluster. + [System.ComponentModel.TypeConverter(typeof(ConnectedClusterTypeConverter))] + public partial class ConnectedCluster + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// 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 ConnectedCluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Gateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.GatewayTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ConnectivityStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ConnectivityStatus = (string) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ConnectivityStatus, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)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("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AgentPublicKeyCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("TotalNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentVersion, global::System.Convert.ToString); + } + if (content.Contains("Distribution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Distribution, global::System.Convert.ToString); + } + if (content.Contains("DistributionVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).DistributionVersion, global::System.Convert.ToString); + } + if (content.Contains("Infrastructure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Infrastructure, global::System.Convert.ToString); + } + if (content.Contains("Offering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Offering, global::System.Convert.ToString); + } + if (content.Contains("ManagedIdentityCertificateExpirationTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastConnectivityTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PrivateLinkState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkState = (string) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkState, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkScopeResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureHybridBenefit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AzureHybridBenefit, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentryConfiguration = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); + } + if (content.Contains("MiscellaneousProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileSystemComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponentTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentError = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayResourceId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)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("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID = (System.Collections.Generic.List) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArcAgentProfileDesiredAgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade = (string) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).WorkloadIdentityEnabled, (__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 ConnectedCluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Gateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.GatewayTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ConnectivityStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ConnectivityStatus = (string) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ConnectivityStatus, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)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("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AgentPublicKeyCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("TotalNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AgentVersion, global::System.Convert.ToString); + } + if (content.Contains("Distribution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Distribution, global::System.Convert.ToString); + } + if (content.Contains("DistributionVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).DistributionVersion, global::System.Convert.ToString); + } + if (content.Contains("Infrastructure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Infrastructure, global::System.Convert.ToString); + } + if (content.Contains("Offering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).Offering, global::System.Convert.ToString); + } + if (content.Contains("ManagedIdentityCertificateExpirationTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastConnectivityTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PrivateLinkState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkState = (string) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkState, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkScopeResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureHybridBenefit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AzureHybridBenefit, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentryConfiguration = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); + } + if (content.Contains("MiscellaneousProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileSystemComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponentTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentError = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayResourceId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)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("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID = (System.Collections.Generic.List) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArcAgentProfileDesiredAgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade = (string) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).ArcAgentProfileAgentAutoUpgrade, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ConnectedCluster(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ConnectedCluster(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Represents a connected cluster. + [System.ComponentModel.TypeConverter(typeof(ConnectedClusterTypeConverter))] + public partial interface IConnectedCluster + + { + + } +} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.TypeConverter.cs index 623955a9a893..ab17b82cb87f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.cs similarity index 61% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.cs index 15b8fc494deb..8e5d60dbb59d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.cs @@ -3,342 +3,360 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Represents a connected cluster. public partial class ConnectedCluster : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResource(); /// The list of AAD group object IDs that will have admin role of the cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID = value ?? null /* arrayOf */; } + public System.Collections.Generic.List AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID = value ?? null /* arrayOf */; } /// Whether to enable Azure RBAC for Kubernetes authorization. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac = value ?? default(bool); } + public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac = value ?? default(bool); } /// /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfileTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfileTenantId = value ?? null; } + public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfileTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfileTenantId = value ?? null; } /// /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string AgentPublicKeyCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AgentPublicKeyCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AgentPublicKeyCertificate = value ; } + public string AgentPublicKeyCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AgentPublicKeyCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AgentPublicKeyCertificate = value ; } /// Version of the agent running on the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string AgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AgentVersion; } + public string AgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AgentVersion; } /// /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? ArcAgentProfileAgentAutoUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentAutoUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentAutoUpgrade = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions)""); } + public string ArcAgentProfileAgentAutoUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentAutoUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentAutoUpgrade = value ?? null; } /// List of arc agentry and system components errors on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentError; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentError = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ArcAgentProfileAgentError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentError; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentError = value ?? null /* arrayOf */; } /// Represents the current state of the Arc agentry and its dependent components. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentState; } + public string ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentState; } /// Version of the Arc agents to be installed on the cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string ArcAgentProfileDesiredAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileDesiredAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileDesiredAgentVersion = value ?? null; } + public string ArcAgentProfileDesiredAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileDesiredAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileDesiredAgentVersion = value ?? null; } /// List of system extensions that are installed on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileSystemComponent; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileSystemComponent = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ArcAgentProfileSystemComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileSystemComponent; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileSystemComponent = value ?? null /* arrayOf */; } /// Configuration settings for customizing the behavior of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentryConfiguration = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ArcAgentryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentryConfiguration = value ?? null /* arrayOf */; } /// Indicates whether Azure Hybrid Benefit is opted in [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AzureHybridBenefit; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AzureHybridBenefit = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit)""); } + public string AzureHybridBenefit { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AzureHybridBenefit; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AzureHybridBenefit = value ?? null; } /// Represents the connectivity status of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? ConnectivityStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ConnectivityStatus; } + public string ConnectivityStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ConnectivityStatus; } /// The Kubernetes distribution running on this connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Distribution { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Distribution; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Distribution = value ?? null; } + public string Distribution { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Distribution; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Distribution = value ?? null; } /// The Kubernetes distribution version on this connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string DistributionVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).DistributionVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).DistributionVersion = value ?? null; } + public string DistributionVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).DistributionVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).DistributionVersion = value ?? null; } /// Indicates whether the gateway for arc router connectivity is enabled. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? GatewayEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).GatewayEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).GatewayEnabled = value ?? default(bool); } + public bool? GatewayEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).GatewayEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).GatewayEnabled = value ?? default(bool); } /// The resource ID of the gateway used for the Arc router feature. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string GatewayResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).GatewayResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).GatewayResourceId = value ?? null; } + public string GatewayResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).GatewayResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).GatewayResourceId = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity _identity; /// The identity of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity()); set => this._identity = value; } /// /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).PrincipalId; } + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).PrincipalId; } /// /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).TenantId; } + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).TenantId; } /// /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The /// type 'None' means no identity is assigned to the connected cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).Type = value ; } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).Type = value ; } /// /// The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Infrastructure { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Infrastructure; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Infrastructure = value ?? null; } + public string Infrastructure { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Infrastructure; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Infrastructure = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind? _kind; + private string _kind; /// The kind of connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind? Kind { get => this._kind; set => this._kind = value; } + public string Kind { get => this._kind; set => this._kind = value; } /// The Kubernetes version of the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).KubernetesVersion; } + public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).KubernetesVersion; } /// /// Time representing the last instance when heart beat was received from the cluster /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public global::System.DateTime? LastConnectivityTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).LastConnectivityTime; } + public global::System.DateTime? LastConnectivityTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).LastConnectivityTime; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } /// Expiration time of the managed identity certificate [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public global::System.DateTime? ManagedIdentityCertificateExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ManagedIdentityCertificateExpirationTime; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Type = value; } + public global::System.DateTime? ManagedIdentityCertificateExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ManagedIdentityCertificateExpirationTime; } /// Internal Acessors for AadProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AadProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AadProfile = value; } /// Internal Acessors for AgentVersion - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.AgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).AgentVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.AgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).AgentVersion = value; } /// Internal Acessors for ArcAgentProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.ArcAgentProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.ArcAgentProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfile = value; } /// Internal Acessors for ArcAgentProfileAgentState - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ArcAgentProfileAgentState = value; } /// Internal Acessors for ConnectivityStatus - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.ConnectivityStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ConnectivityStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ConnectivityStatus = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.ConnectivityStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ConnectivityStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ConnectivityStatus = value; } /// Internal Acessors for Gateway - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.Gateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Gateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Gateway = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.Gateway { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Gateway; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Gateway = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for KubernetesVersion - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).KubernetesVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).KubernetesVersion = value; } /// Internal Acessors for LastConnectivityTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.LastConnectivityTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).LastConnectivityTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).LastConnectivityTime = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.LastConnectivityTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).LastConnectivityTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).LastConnectivityTime = value; } /// Internal Acessors for ManagedIdentityCertificateExpirationTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.ManagedIdentityCertificateExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ManagedIdentityCertificateExpirationTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ManagedIdentityCertificateExpirationTime = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.ManagedIdentityCertificateExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ManagedIdentityCertificateExpirationTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ManagedIdentityCertificateExpirationTime = value; } /// Internal Acessors for MiscellaneousProperty - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.MiscellaneousProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).MiscellaneousProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).MiscellaneousProperty = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.MiscellaneousProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).MiscellaneousProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).MiscellaneousProperty = value; } /// Internal Acessors for Offering - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.Offering { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Offering; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Offering = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.Offering { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Offering; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Offering = value; } /// Internal Acessors for OidcIssuerProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.OidcIssuerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.OidcIssuerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfile = value; } /// Internal Acessors for OidcIssuerProfileIssuerUrl - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties()); set { {_property = value;} } } /// Internal Acessors for SecurityProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).SecurityProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).SecurityProfile = value; } /// Internal Acessors for SecurityProfileWorkloadIdentity - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedAt = value; } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedBy = value; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedByType = value; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; } /// Internal Acessors for TotalCoreCount - int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.TotalCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).TotalCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).TotalCoreCount = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.TotalCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).TotalCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).TotalCoreCount = value; } /// Internal Acessors for TotalNodeCount - int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterInternal.TotalNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).TotalNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).TotalNodeCount = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterInternal.TotalNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).TotalNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).TotalNodeCount = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Type = value; } /// More properties related to the Connected Cluster [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).MiscellaneousProperty; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).MiscellaneousProperty; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Name; } /// Connected cluster offering [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Offering { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).Offering; } + public string Offering { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).Offering; } /// Whether to enable oidc issuer for workload identity integration. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? OidcIssuerProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled = value ?? default(bool); } + public bool? OidcIssuerProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled = value ?? default(bool); } /// /// The issuer url for hybrid clusters connected to Arc used for the workload identity feature. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; } + public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; } /// /// The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string OidcIssuerProfileSelfHostedIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileSelfHostedIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileSelfHostedIssuerUrl = value ?? null; } + public string OidcIssuerProfileSelfHostedIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileSelfHostedIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).OidcIssuerProfileSelfHostedIssuerUrl = value ?? null; } /// /// This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster /// is assigned to, if any. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string PrivateLinkScopeResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).PrivateLinkScopeResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).PrivateLinkScopeResourceId = value ?? null; } + public string PrivateLinkScopeResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).PrivateLinkScopeResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).PrivateLinkScopeResourceId = value ?? null; } /// /// Property which describes the state of private link on a connected cluster resource. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? PrivateLinkState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).PrivateLinkState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).PrivateLinkState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState)""); } + public string PrivateLinkState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).PrivateLinkState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).PrivateLinkState = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties _property; /// Describes the connected cluster resource properties. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties()); set => this._property = value; } /// Provisioning state of the connected cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState)""); } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData _systemData; /// Metadata pertaining to creation and last modification of the resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource modification (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// Number of CPU cores present in the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public int? TotalCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).TotalCoreCount; } + public int? TotalCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).TotalCoreCount; } /// Number of nodes present in the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public int? TotalNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).TotalNodeCount; } + public int? TotalNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).TotalNodeCount; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__trackedResource).Type; } /// Whether to enable or disable the workload identity Webhook [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).WorkloadIdentityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal)Property).WorkloadIdentityEnabled = value ?? default(bool); } + public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).WorkloadIdentityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)Property).WorkloadIdentityEnabled = value ?? default(bool); } /// Creates an new instance. public ConnectedCluster() @@ -361,20 +379,26 @@ public ConnectedCluster() /// Represents a connected cluster. public partial interface IConnectedCluster : Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource { /// The list of AAD group object IDs that will have admin role of the cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of AAD group object IDs that will have admin role of the cluster.", SerializedName = @"adminGroupObjectIDs", PossibleTypes = new [] { typeof(string) })] - string[] AadProfileAdminGroupObjectID { get; set; } + System.Collections.Generic.List AadProfileAdminGroupObjectID { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", SerializedName = @"enableAzureRBAC", PossibleTypes = new [] { typeof(bool) })] @@ -385,6 +409,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", SerializedName = @"tenantID", PossibleTypes = new [] { typeof(string) })] @@ -395,6 +422,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.", SerializedName = @"agentPublicKeyCertificate", PossibleTypes = new [] { typeof(string) })] @@ -403,6 +433,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Version of the agent running on the connected cluster resource", SerializedName = @"agentVersion", PossibleTypes = new [] { typeof(string) })] @@ -413,22 +446,32 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.", SerializedName = @"agentAutoUpgrade", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? ArcAgentProfileAgentAutoUpgrade { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string ArcAgentProfileAgentAutoUpgrade { get; set; } /// List of arc agentry and system components errors on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of arc agentry and system components errors on the cluster resource.", SerializedName = @"agentErrors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError) })] + System.Collections.Generic.List ArcAgentProfileAgentError { get; set; } /// Represents the current state of the Arc agentry and its dependent components. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the current state of the Arc agentry and its dependent components.", SerializedName = @"agentState", PossibleTypes = new [] { typeof(string) })] @@ -437,6 +480,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the Arc agents to be installed on the cluster resource", SerializedName = @"desiredAgentVersion", PossibleTypes = new [] { typeof(string) })] @@ -445,38 +491,55 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of system extensions that are installed on the cluster resource.", SerializedName = @"systemComponents", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent) })] + System.Collections.Generic.List ArcAgentProfileSystemComponent { get; set; } /// Configuration settings for customizing the behavior of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings for customizing the behavior of the connected cluster.", SerializedName = @"arcAgentryConfigurations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations) })] + System.Collections.Generic.List ArcAgentryConfiguration { get; set; } /// Indicates whether Azure Hybrid Benefit is opted in [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the connectivity status of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the connectivity status of the connected cluster.", SerializedName = @"connectivityStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? ConnectivityStatus { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Connecting", "Connected", "Offline", "Expired")] + string ConnectivityStatus { get; } /// The Kubernetes distribution running on this connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Kubernetes distribution running on this connected cluster.", SerializedName = @"distribution", PossibleTypes = new [] { typeof(string) })] @@ -485,6 +548,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Kubernetes distribution version on this connected cluster.", SerializedName = @"distributionVersion", PossibleTypes = new [] { typeof(string) })] @@ -493,6 +559,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the gateway for arc router connectivity is enabled.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -501,6 +570,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The resource ID of the gateway used for the Arc router feature.", SerializedName = @"resourceId", PossibleTypes = new [] { typeof(string) })] @@ -511,6 +583,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal id of connected cluster identity. This property will only be provided for a system assigned identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -521,6 +596,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -532,16 +610,23 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("None", "SystemAssigned")] + string IdentityType { get; set; } /// /// The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.", SerializedName = @"infrastructure", PossibleTypes = new [] { typeof(string) })] @@ -550,14 +635,21 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The kind of connected cluster.", SerializedName = @"kind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind? Kind { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + string Kind { get; set; } /// The Kubernetes version of the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Kubernetes version of the connected cluster resource", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] @@ -568,6 +660,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Time representing the last instance when heart beat was received from the cluster", SerializedName = @"lastConnectivityTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -576,6 +671,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Expiration time of the managed identity certificate", SerializedName = @"managedIdentityCertificateExpirationTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -584,14 +682,20 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"More properties related to the Connected Cluster", SerializedName = @"miscellaneousProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; } /// Connected cluster offering [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Connected cluster offering", SerializedName = @"offering", PossibleTypes = new [] { typeof(string) })] @@ -600,6 +704,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable oidc issuer for workload identity integration.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -610,6 +717,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The issuer url for hybrid clusters connected to Arc used for the workload identity feature.", SerializedName = @"issuerUrl", PossibleTypes = new [] { typeof(string) })] @@ -620,6 +730,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature.", SerializedName = @"selfHostedIssuerUrl", PossibleTypes = new [] { typeof(string) })] @@ -631,6 +744,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any.", SerializedName = @"privateLinkScopeResourceId", PossibleTypes = new [] { typeof(string) })] @@ -641,70 +757,101 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Property which describes the state of private link on a connected cluster resource.", SerializedName = @"privateLinkState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? PrivateLinkState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PrivateLinkState { get; set; } /// Provisioning state of the connected cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of the connected cluster resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource modification (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource modification (UTC).", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// Number of CPU cores present in the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of CPU cores present in the connected cluster resource", SerializedName = @"totalCoreCount", PossibleTypes = new [] { typeof(int) })] @@ -713,6 +860,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of nodes present in the connected cluster resource", SerializedName = @"totalNodeCount", PossibleTypes = new [] { typeof(int) })] @@ -721,6 +871,9 @@ public partial interface IConnectedCluster : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable or disable the workload identity Webhook", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -729,12 +882,12 @@ public partial interface IConnectedCluster : } /// Represents a connected cluster. internal partial interface IConnectedClusterInternal : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal { /// AAD profile for the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile AadProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile AadProfile { get; set; } /// The list of AAD group object IDs that will have admin role of the cluster. - string[] AadProfileAdminGroupObjectID { get; set; } + System.Collections.Generic.List AadProfileAdminGroupObjectID { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. bool? AadProfileEnableAzureRbac { get; set; } /// @@ -748,37 +901,40 @@ internal partial interface IConnectedClusterInternal : /// Version of the agent running on the connected cluster resource string AgentVersion { get; set; } /// Arc agentry configuration for the provisioned cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile ArcAgentProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile ArcAgentProfile { get; set; } /// /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? ArcAgentProfileAgentAutoUpgrade { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string ArcAgentProfileAgentAutoUpgrade { get; set; } /// List of arc agentry and system components errors on the cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get; set; } + System.Collections.Generic.List ArcAgentProfileAgentError { get; set; } /// Represents the current state of the Arc agentry and its dependent components. string ArcAgentProfileAgentState { get; set; } /// Version of the Arc agents to be installed on the cluster resource string ArcAgentProfileDesiredAgentVersion { get; set; } /// List of system extensions that are installed on the cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get; set; } + System.Collections.Generic.List ArcAgentProfileSystemComponent { get; set; } /// Configuration settings for customizing the behavior of the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get; set; } + System.Collections.Generic.List ArcAgentryConfiguration { get; set; } /// Indicates whether Azure Hybrid Benefit is opted in - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the connectivity status of the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? ConnectivityStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Connecting", "Connected", "Offline", "Expired")] + string ConnectivityStatus { get; set; } /// The Kubernetes distribution running on this connected cluster. string Distribution { get; set; } /// The Kubernetes distribution version on this connected cluster. string DistributionVersion { get; set; } /// Details of the gateway used by the Arc router for connectivity. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway Gateway { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway Gateway { get; set; } /// Indicates whether the gateway for arc router connectivity is enabled. bool? GatewayEnabled { get; set; } /// The resource ID of the gateway used for the Arc router feature. string GatewayResourceId { get; set; } /// The identity of the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity Identity { get; set; } /// /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity. /// @@ -791,13 +947,15 @@ internal partial interface IConnectedClusterInternal : /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The /// type 'None' means no identity is assigned to the connected cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("None", "SystemAssigned")] + string IdentityType { get; set; } /// /// The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. /// string Infrastructure { get; set; } /// The kind of connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind? Kind { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + string Kind { get; set; } /// The Kubernetes version of the connected cluster resource string KubernetesVersion { get; set; } /// @@ -807,11 +965,11 @@ internal partial interface IConnectedClusterInternal : /// Expiration time of the managed identity certificate global::System.DateTime? ManagedIdentityCertificateExpirationTime { get; set; } /// More properties related to the Connected Cluster - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; set; } /// Connected cluster offering string Offering { get; set; } /// Open ID Connect (OIDC) Issuer Profile for the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile OidcIssuerProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile OidcIssuerProfile { get; set; } /// Whether to enable oidc issuer for workload identity integration. bool? OidcIssuerProfileEnabled { get; set; } /// @@ -830,29 +988,33 @@ internal partial interface IConnectedClusterInternal : /// /// Property which describes the state of private link on a connected cluster resource. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? PrivateLinkState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PrivateLinkState { get; set; } /// Describes the connected cluster resource properties. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties Property { get; set; } /// Provisioning state of the connected cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } /// Security profile for the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile SecurityProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile SecurityProfile { get; set; } /// The workload identity feature webhook. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } /// Metadata pertaining to creation and last modification of the resource - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The timestamp of resource 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.ConnectedKubernetes.Support.LastModifiedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// Number of CPU cores present in the connected cluster resource int? TotalCoreCount { get; set; } /// Number of nodes present in the connected cluster resource diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.json.cs similarity index 91% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.json.cs index b958806c79b4..852346fff340 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedCluster.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedCluster.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ConnectedCluster(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResource(json); - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterIdentity.FromJson(__jsonIdentity) : Identity;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResource(json); + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterIdentity.FromJson(__jsonIdentity) : _identity;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedCluster(json) : null; } @@ -107,7 +107,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.PowerShell.cs similarity index 73% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.PowerShell.cs index 7227c7a5e74e..15c63e6efa42 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectedClusterIdentity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal ConnectedClusterIdentity(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal ConnectedClusterIdentity(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectedClusterIdentity(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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectedClusterIdentity(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.TypeConverter.cs index a76006211800..ad64e100e451 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.cs similarity index 84% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.cs index 274653b2aa9a..5ee814c03360 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Identity for the connected cluster. public partial class ConnectedClusterIdentity : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -38,14 +38,14 @@ public partial class ConnectedClusterIdentity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType _type; + private string _type; /// /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The /// type 'None' means no identity is assigned to the connected cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Creates an new instance. public ConnectedClusterIdentity() @@ -63,6 +63,9 @@ public partial interface IConnectedClusterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal id of connected cluster identity. This property will only be provided for a system assigned identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -73,6 +76,9 @@ public partial interface IConnectedClusterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -84,10 +90,14 @@ public partial interface IConnectedClusterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("None", "SystemAssigned")] + string Type { get; set; } } /// Identity for the connected cluster. @@ -106,7 +116,8 @@ internal partial interface IConnectedClusterIdentityInternal /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The /// type 'None' means no identity is assigned to the connected cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("None", "SystemAssigned")] + string Type { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.json.cs index c945d56c0e36..4d465c19cabe 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterIdentity.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ConnectedClusterIdentity(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKu { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterIdentity(json) : null; } @@ -102,11 +102,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.PowerShell.cs similarity index 74% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.PowerShell.cs index cd86ecfc70a9..df9aa6becd5a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectedClusterList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ConnectedClusterList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ConnectedClusterList(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectedClusterList(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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectedClusterList(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.TypeConverter.cs index 1f1eae4357f1..8e535c3ce0b5 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.cs similarity index 76% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.cs index 2a5c32687ad8..537f2e14bbbf 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The paginated list of connected Clusters public partial class ConnectedClusterList : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterListInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterListInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class ConnectedClusterList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster[] _value; + private System.Collections.Generic.List _value; /// The list of connected clusters [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ConnectedClusterList() @@ -41,6 +41,9 @@ public partial interface IConnectedClusterList : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The link to fetch the next page of connected clusters", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -49,10 +52,13 @@ public partial interface IConnectedClusterList : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of connected clusters", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster) })] + System.Collections.Generic.List Value { get; set; } } /// The paginated list of connected Clusters @@ -62,7 +68,7 @@ internal partial interface IConnectedClusterListInternal /// The link to fetch the next page of connected clusters string NextLink { get; set; } /// The list of connected clusters - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.json.cs similarity index 90% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.json.cs index 3f4c9b3b585a..8e65f1de66e5 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterList.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ConnectedClusterList(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubern { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster.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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterList(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.PowerShell.cs similarity index 64% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.PowerShell.cs index 867607104a05..8a039ad13d7f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectedClusterPatch partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,29 +78,29 @@ internal ConnectedClusterPatch(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTagsTypeConverter.ConvertFrom); } if (content.Contains("Distribution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Distribution, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Distribution, global::System.Convert.ToString); } if (content.Contains("DistributionVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).DistributionVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).DistributionVersion, global::System.Convert.ToString); } if (content.Contains("AzureHybridBenefit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).AzureHybridBenefit, 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. @@ -115,51 +115,49 @@ internal ConnectedClusterPatch(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTagsTypeConverter.ConvertFrom); } if (content.Contains("Distribution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).Distribution, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).Distribution, global::System.Convert.ToString); } if (content.Contains("DistributionVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).DistributionVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).DistributionVersion, global::System.Convert.ToString); } if (content.Contains("AzureHybridBenefit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal)this).AzureHybridBenefit, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectedClusterPatch(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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectedClusterPatch(content); } @@ -169,7 +167,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.TypeConverter.cs index 3a71f15015dc..1de1c585f3c1 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.cs similarity index 64% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.cs index ead38e85bc91..7280ba716093 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.cs @@ -3,46 +3,46 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Object containing updates for patch operations. public partial class ConnectedClusterPatch : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal { /// Indicates whether Azure Hybrid Benefit is opted in [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)Property).AzureHybridBenefit; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)Property).AzureHybridBenefit = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit)""); } + public string AzureHybridBenefit { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)Property).AzureHybridBenefit; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)Property).AzureHybridBenefit = value ?? null; } /// Represents the distribution of the connected cluster [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Distribution { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)Property).Distribution; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)Property).Distribution = value ?? null; } + public string Distribution { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)Property).Distribution; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)Property).Distribution = value ?? null; } /// Represents the Kubernetes distribution version on this connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string DistributionVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)Property).DistributionVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)Property).DistributionVersion = value ?? null; } + public string DistributionVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)Property).DistributionVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)Property).DistributionVersion = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties _property; /// /// Describes the connected cluster resource properties that can be updated during PATCH operation. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties()); set => this._property = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags()); set => this._tag = value; } /// Creates an new instance. public ConnectedClusterPatch() @@ -58,14 +58,21 @@ public partial interface IConnectedClusterPatch : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the distribution of the connected cluster [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Represents the distribution of the connected cluster", SerializedName = @"distribution", PossibleTypes = new [] { typeof(string) })] @@ -74,6 +81,9 @@ public partial interface IConnectedClusterPatch : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Represents the Kubernetes distribution version on this connected cluster.", SerializedName = @"distributionVersion", PossibleTypes = new [] { typeof(string) })] @@ -82,10 +92,13 @@ public partial interface IConnectedClusterPatch : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags Tag { get; set; } } /// Object containing updates for patch operations. @@ -93,7 +106,8 @@ internal partial interface IConnectedClusterPatchInternal { /// Indicates whether Azure Hybrid Benefit is opted in - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the distribution of the connected cluster string Distribution { get; set; } /// Represents the Kubernetes distribution version on this connected cluster. @@ -101,9 +115,9 @@ internal partial interface IConnectedClusterPatchInternal /// /// Describes the connected cluster resource properties that can be updated during PATCH operation. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties Property { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.json.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.json.cs index 22b20854cda1..d2332773c9ce 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatch.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatch.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ConnectedClusterPatch(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKuber { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchProperties.FromJson(__jsonProperties) : Property;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags.FromJson(__jsonTags) : Tag;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchProperties.FromJson(__jsonProperties) : _property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags.FromJson(__jsonTags) : _tag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPatch(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.PowerShell.cs similarity index 72% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.PowerShell.cs index 1cf64b6fa9e2..3f0aa68f3ab4 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectedClusterPatchProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal ConnectedClusterPatchProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Distribution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).Distribution, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).Distribution, global::System.Convert.ToString); } if (content.Contains("DistributionVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); } if (content.Contains("AzureHybridBenefit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,43 @@ internal ConnectedClusterPatchProperties(global::System.Management.Automation.PS // actually deserialize if (content.Contains("Distribution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).Distribution, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).Distribution, global::System.Convert.ToString); } if (content.Contains("DistributionVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); } if (content.Contains("AzureHybridBenefit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit?) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal)this).AzureHybridBenefit, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectedClusterPatchProperties(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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectedClusterPatchProperties(content); } @@ -153,7 +153,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.TypeConverter.cs index 4413d19a0e68..b0decfa53b41 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.cs similarity index 82% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.cs index f0edd4730188..512b0a4cee6e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Properties which can be patched on the connected cluster resource. public partial class ConnectedClusterPatchProperties : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? _azureHybridBenefit; + private string _azureHybridBenefit; /// Indicates whether Azure Hybrid Benefit is opted in [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get => this._azureHybridBenefit; set => this._azureHybridBenefit = value; } + public string AzureHybridBenefit { get => this._azureHybridBenefit; set => this._azureHybridBenefit = value; } /// Backing field for property. private string _distribution; @@ -48,14 +48,21 @@ public partial interface IConnectedClusterPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the distribution of the connected cluster [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Represents the distribution of the connected cluster", SerializedName = @"distribution", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +71,9 @@ public partial interface IConnectedClusterPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Represents the Kubernetes distribution version on this connected cluster.", SerializedName = @"distributionVersion", PossibleTypes = new [] { typeof(string) })] @@ -75,7 +85,8 @@ internal partial interface IConnectedClusterPatchPropertiesInternal { /// Indicates whether Azure Hybrid Benefit is opted in - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the distribution of the connected cluster string Distribution { get; set; } /// Represents the Kubernetes distribution version on this connected cluster. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.json.cs index e152dfef58f9..c27f073ec294 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchProperties.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ConnectedClusterPatchProperties(Microsoft.Azure.PowerShell.Cmdlets.Conn { return; } - {_distribution = If( json?.PropertyT("distribution"), out var __jsonDistribution) ? (string)__jsonDistribution : (string)Distribution;} - {_distributionVersion = If( json?.PropertyT("distributionVersion"), out var __jsonDistributionVersion) ? (string)__jsonDistributionVersion : (string)DistributionVersion;} - {_azureHybridBenefit = If( json?.PropertyT("azureHybridBenefit"), out var __jsonAzureHybridBenefit) ? (string)__jsonAzureHybridBenefit : (string)AzureHybridBenefit;} + {_distribution = If( json?.PropertyT("distribution"), out var __jsonDistribution) ? (string)__jsonDistribution : (string)_distribution;} + {_distributionVersion = If( json?.PropertyT("distributionVersion"), out var __jsonDistributionVersion) ? (string)__jsonDistributionVersion : (string)_distributionVersion;} + {_azureHybridBenefit = If( json?.PropertyT("azureHybridBenefit"), out var __jsonAzureHybridBenefit) ? (string)__jsonAzureHybridBenefit : (string)_azureHybridBenefit;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPatchProperties(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.PowerShell.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.PowerShell.cs index 81a0b1eecf78..c506eaacc2b7 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectedClusterPatchTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -82,7 +82,7 @@ internal ConnectedClusterPatchTags(global::System.Collections.IDictionary conten } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,29 +101,27 @@ internal ConnectedClusterPatchTags(global::System.Management.Automation.PSObject } /// - /// 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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectedClusterPatchTags(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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectedClusterPatchTags(content); } @@ -133,7 +131,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.TypeConverter.cs index 138f18f35e21..dd07e371e9bb 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.cs similarity index 89% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.cs index 9ca86bc49778..4e4b2ed05f26 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Resource tags. public partial class ConnectedClusterPatchTags : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTagsInternal { /// Creates an new instance. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.dictionary.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.dictionary.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.dictionary.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.dictionary.cs index 2030d3b6d8ef..3230d85072ad 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.dictionary.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatchTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatchTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.json.cs index da4df560982e..e17c38de147a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPatchTags.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPatchTags.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -71,13 +71,13 @@ internal ConnectedClusterPatchTags(Microsoft.Azure.PowerShell.Cmdlets.ConnectedK } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPatchTags(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.PowerShell.cs new file mode 100644 index 000000000000..dfb026006efb --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.PowerShell.cs @@ -0,0 +1,460 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + + /// Properties of the connected cluster. + [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPropertiesTypeConverter))] + public partial class ConnectedClusterProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// 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 ConnectedClusterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ArcAgentProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Gateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.GatewayTypeConverter.ConvertFrom); + } + if (content.Contains("AgentPublicKeyCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("TotalNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Distribution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Distribution, global::System.Convert.ToString); + } + if (content.Contains("DistributionVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); + } + if (content.Contains("Infrastructure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Infrastructure, global::System.Convert.ToString); + } + if (content.Contains("Offering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Offering, global::System.Convert.ToString); + } + if (content.Contains("ManagedIdentityCertificateExpirationTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastConnectivityTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ConnectivityStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ConnectivityStatus = (string) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ConnectivityStatus, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkState = (string) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkState, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkScopeResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureHybridBenefit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); + } + if (content.Contains("MiscellaneousProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileSystemComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponentTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayResourceId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (System.Collections.Generic.List) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArcAgentProfileDesiredAgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade = (string) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled, (__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 ConnectedClusterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ArcAgentProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile) content.GetValueForProperty("ArcAgentProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("Gateway")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Gateway = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway) content.GetValueForProperty("Gateway",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Gateway, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.GatewayTypeConverter.ConvertFrom); + } + if (content.Contains("AgentPublicKeyCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("TotalNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalCoreCount = (int?) content.GetValueForProperty("TotalCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).TotalCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Distribution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Distribution = (string) content.GetValueForProperty("Distribution",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Distribution, global::System.Convert.ToString); + } + if (content.Contains("DistributionVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).DistributionVersion = (string) content.GetValueForProperty("DistributionVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).DistributionVersion, global::System.Convert.ToString); + } + if (content.Contains("Infrastructure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Infrastructure = (string) content.GetValueForProperty("Infrastructure",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Infrastructure, global::System.Convert.ToString); + } + if (content.Contains("Offering")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Offering = (string) content.GetValueForProperty("Offering",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).Offering, global::System.Convert.ToString); + } + if (content.Contains("ManagedIdentityCertificateExpirationTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ManagedIdentityCertificateExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ManagedIdentityCertificateExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastConnectivityTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).LastConnectivityTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectivityTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).LastConnectivityTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ConnectivityStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ConnectivityStatus = (string) content.GetValueForProperty("ConnectivityStatus",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ConnectivityStatus, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkState = (string) content.GetValueForProperty("PrivateLinkState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkState, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkScopeResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId = (string) content.GetValueForProperty("PrivateLinkScopeResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).PrivateLinkScopeResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureHybridBenefit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit = (string) content.GetValueForProperty("AzureHybridBenefit",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AzureHybridBenefit, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentryConfiguration, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurationsTypeConverter.ConvertFrom)); + } + if (content.Contains("MiscellaneousProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties) content.GetValueForProperty("MiscellaneousProperty",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).MiscellaneousProperty, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileSystemComponent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileSystemComponent",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileSystemComponent, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SystemComponentTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError = (System.Collections.Generic.List) content.GetValueForProperty("ArcAgentProfileAgentError",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentError, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AgentErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("ArcAgentProfileAgentState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState = (string) content.GetValueForProperty("ArcAgentProfileAgentState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentState, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayResourceId = (string) content.GetValueForProperty("GatewayResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayResourceId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (System.Collections.Generic.List) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArcAgentProfileDesiredAgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion = (string) content.GetValueForProperty("ArcAgentProfileDesiredAgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileDesiredAgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ArcAgentProfileAgentAutoUpgrade")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade = (string) content.GetValueForProperty("ArcAgentProfileAgentAutoUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).ArcAgentProfileAgentAutoUpgrade, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OidcIssuerProfileSelfHostedIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileSelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).OidcIssuerProfileSelfHostedIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("GatewayEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayEnabled = (bool?) content.GetValueForProperty("GatewayEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).GatewayEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ConnectedClusterProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ConnectedClusterProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString(); + + 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 the connected cluster. + [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPropertiesTypeConverter))] + public partial interface IConnectedClusterProperties + + { + + } +} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.TypeConverter.cs index 34cd5b7987a7..55f0fcc4a6ad 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.cs similarity index 69% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.cs index a7327931a9c5..fef8a2c9e9e5 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Properties of the connected cluster. public partial class ConnectedClusterProperties : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile _aadProfile; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile _aadProfile; /// AAD profile for the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile()); set => this._aadProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile()); set => this._aadProfile = value; } /// The list of AAD group object IDs that will have admin role of the cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)AadProfile).AdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)AadProfile).AdminGroupObjectID = value ?? null /* arrayOf */; } + public System.Collections.Generic.List AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)AadProfile).AdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)AadProfile).AdminGroupObjectID = value ?? null /* arrayOf */; } /// Whether to enable Azure RBAC for Kubernetes authorization. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)AadProfile).EnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)AadProfile).EnableAzureRbac = value ?? default(bool); } + public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)AadProfile).EnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)AadProfile).EnableAzureRbac = value ?? default(bool); } /// /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)AadProfile).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfileInternal)AadProfile).TenantId = value ?? null; } + public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)AadProfile).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfileInternal)AadProfile).TenantId = value ?? null; } /// Backing field for property. private string _agentPublicKeyCertificate; @@ -51,54 +51,54 @@ public partial class ConnectedClusterProperties : public string AgentVersion { get => this._agentVersion; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile _arcAgentProfile; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile _arcAgentProfile; /// Arc agentry configuration for the provisioned cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile ArcAgentProfile { get => (this._arcAgentProfile = this._arcAgentProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile()); set => this._arcAgentProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile ArcAgentProfile { get => (this._arcAgentProfile = this._arcAgentProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile()); set => this._arcAgentProfile = value; } /// /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? ArcAgentProfileAgentAutoUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentAutoUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentAutoUpgrade = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions)""); } + public string ArcAgentProfileAgentAutoUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentAutoUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentAutoUpgrade = value ?? null; } /// List of arc agentry and system components errors on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentError; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentError = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ArcAgentProfileAgentError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentError; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentError = value ?? null /* arrayOf */; } /// Represents the current state of the Arc agentry and its dependent components. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentState; } + public string ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentState; } /// Version of the Arc agents to be installed on the cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string ArcAgentProfileDesiredAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).DesiredAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).DesiredAgentVersion = value ?? null; } + public string ArcAgentProfileDesiredAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).DesiredAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).DesiredAgentVersion = value ?? null; } /// List of system extensions that are installed on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).SystemComponent; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).SystemComponent = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ArcAgentProfileSystemComponent { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).SystemComponent; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).SystemComponent = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] _arcAgentryConfiguration; + private System.Collections.Generic.List _arcAgentryConfiguration; /// Configuration settings for customizing the behavior of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get => this._arcAgentryConfiguration; set => this._arcAgentryConfiguration = value; } + public System.Collections.Generic.List ArcAgentryConfiguration { get => this._arcAgentryConfiguration; set => this._arcAgentryConfiguration = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? _azureHybridBenefit; + private string _azureHybridBenefit; /// Indicates whether Azure Hybrid Benefit is opted in [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get => this._azureHybridBenefit; set => this._azureHybridBenefit = value; } + public string AzureHybridBenefit { get => this._azureHybridBenefit; set => this._azureHybridBenefit = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? _connectivityStatus; + private string _connectivityStatus; /// Represents the connectivity status of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? ConnectivityStatus { get => this._connectivityStatus; } + public string ConnectivityStatus { get => this._connectivityStatus; } /// Backing field for property. private string _distribution; @@ -115,19 +115,19 @@ public partial class ConnectedClusterProperties : public string DistributionVersion { get => this._distributionVersion; set => this._distributionVersion = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway _gateway; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway _gateway; /// Details of the gateway used by the Arc router for connectivity. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway Gateway { get => (this._gateway = this._gateway ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway()); set => this._gateway = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway Gateway { get => (this._gateway = this._gateway ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway()); set => this._gateway = value; } /// Indicates whether the gateway for arc router connectivity is enabled. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? GatewayEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)Gateway).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)Gateway).Enabled = value ?? default(bool); } + public bool? GatewayEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)Gateway).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)Gateway).Enabled = value ?? default(bool); } /// The resource ID of the gateway used for the Arc router feature. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string GatewayResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)Gateway).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)Gateway).ResourceId = value ?? null; } + public string GatewayResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)Gateway).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)Gateway).ResourceId = value ?? null; } /// Backing field for property. private string _infrastructure; @@ -164,62 +164,62 @@ public partial class ConnectedClusterProperties : public global::System.DateTime? ManagedIdentityCertificateExpirationTime { get => this._managedIdentityCertificateExpirationTime; } /// Internal Acessors for AadProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile()); set { {_aadProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile()); set { {_aadProfile = value;} } } /// Internal Acessors for AgentVersion - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.AgentVersion { get => this._agentVersion; set { {_agentVersion = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.AgentVersion { get => this._agentVersion; set { {_agentVersion = value;} } } /// Internal Acessors for ArcAgentProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.ArcAgentProfile { get => (this._arcAgentProfile = this._arcAgentProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile()); set { {_arcAgentProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.ArcAgentProfile { get => (this._arcAgentProfile = this._arcAgentProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile()); set { {_arcAgentProfile = value;} } } /// Internal Acessors for ArcAgentProfileAgentState - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfileInternal)ArcAgentProfile).AgentState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.ArcAgentProfileAgentState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfileInternal)ArcAgentProfile).AgentState = value; } /// Internal Acessors for ConnectivityStatus - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.ConnectivityStatus { get => this._connectivityStatus; set { {_connectivityStatus = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.ConnectivityStatus { get => this._connectivityStatus; set { {_connectivityStatus = value;} } } /// Internal Acessors for Gateway - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.Gateway { get => (this._gateway = this._gateway ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway()); set { {_gateway = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.Gateway { get => (this._gateway = this._gateway ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway()); set { {_gateway = value;} } } /// Internal Acessors for KubernetesVersion - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.KubernetesVersion { get => this._kubernetesVersion; set { {_kubernetesVersion = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.KubernetesVersion { get => this._kubernetesVersion; set { {_kubernetesVersion = value;} } } /// Internal Acessors for LastConnectivityTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.LastConnectivityTime { get => this._lastConnectivityTime; set { {_lastConnectivityTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.LastConnectivityTime { get => this._lastConnectivityTime; set { {_lastConnectivityTime = value;} } } /// Internal Acessors for ManagedIdentityCertificateExpirationTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.ManagedIdentityCertificateExpirationTime { get => this._managedIdentityCertificateExpirationTime; set { {_managedIdentityCertificateExpirationTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.ManagedIdentityCertificateExpirationTime { get => this._managedIdentityCertificateExpirationTime; set { {_managedIdentityCertificateExpirationTime = value;} } } /// Internal Acessors for MiscellaneousProperty - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.MiscellaneousProperty { get => (this._miscellaneousProperty = this._miscellaneousProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties()); set { {_miscellaneousProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.MiscellaneousProperty { get => (this._miscellaneousProperty = this._miscellaneousProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties()); set { {_miscellaneousProperty = value;} } } /// Internal Acessors for Offering - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.Offering { get => this._offering; set { {_offering = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.Offering { get => this._offering; set { {_offering = value;} } } /// Internal Acessors for OidcIssuerProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile()); set { {_oidcIssuerProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile()); set { {_oidcIssuerProfile = value;} } } /// Internal Acessors for OidcIssuerProfileIssuerUrl - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl = value; } /// Internal Acessors for SecurityProfile - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfile()); set { {_securityProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfile()); set { {_securityProfile = value;} } } /// Internal Acessors for SecurityProfileWorkloadIdentity - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)SecurityProfile).WorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)SecurityProfile).WorkloadIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)SecurityProfile).WorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)SecurityProfile).WorkloadIdentity = value; } /// Internal Acessors for TotalCoreCount - int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.TotalCoreCount { get => this._totalCoreCount; set { {_totalCoreCount = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.TotalCoreCount { get => this._totalCoreCount; set { {_totalCoreCount = value;} } } /// Internal Acessors for TotalNodeCount - int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesInternal.TotalNodeCount { get => this._totalNodeCount; set { {_totalNodeCount = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesInternal.TotalNodeCount { get => this._totalNodeCount; set { {_totalNodeCount = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties _miscellaneousProperty; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties _miscellaneousProperty; /// More properties related to the Connected Cluster [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get => (this._miscellaneousProperty = this._miscellaneousProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties()); } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get => (this._miscellaneousProperty = this._miscellaneousProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties()); } /// Backing field for property. private string _offering; @@ -229,27 +229,27 @@ public partial class ConnectedClusterProperties : public string Offering { get => this._offering; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile _oidcIssuerProfile; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile _oidcIssuerProfile; /// Open ID Connect (OIDC) Issuer Profile for the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile()); set => this._oidcIssuerProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile()); set => this._oidcIssuerProfile = value; } /// Whether to enable oidc issuer for workload identity integration. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? OidcIssuerProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).Enabled = value ?? default(bool); } + public bool? OidcIssuerProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).Enabled = value ?? default(bool); } /// /// The issuer url for hybrid clusters connected to Arc used for the workload identity feature. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; } + public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; } /// /// The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string OidcIssuerProfileSelfHostedIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).SelfHostedIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)OidcIssuerProfile).SelfHostedIssuerUrl = value ?? null; } + public string OidcIssuerProfileSelfHostedIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).SelfHostedIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)OidcIssuerProfile).SelfHostedIssuerUrl = value ?? null; } /// Backing field for property. private string _privateLinkScopeResourceId; @@ -262,27 +262,27 @@ public partial class ConnectedClusterProperties : public string PrivateLinkScopeResourceId { get => this._privateLinkScopeResourceId; set => this._privateLinkScopeResourceId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? _privateLinkState; + private string _privateLinkState; /// /// Property which describes the state of private link on a connected cluster resource. /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? PrivateLinkState { get => this._privateLinkState; set => this._privateLinkState = value; } + public string PrivateLinkState { get => this._privateLinkState; set => this._privateLinkState = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? _provisioningState; + private string _provisioningState; /// Provisioning state of the connected cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } + public string ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile _securityProfile; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile _securityProfile; /// Security profile for the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfile()); set => this._securityProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfile()); set => this._securityProfile = value; } /// Backing field for property. private int? _totalCoreCount; @@ -300,7 +300,7 @@ public partial class ConnectedClusterProperties : /// Whether to enable or disable the workload identity Webhook [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)SecurityProfile).WorkloadIdentityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)SecurityProfile).WorkloadIdentityEnabled = value ?? default(bool); } + public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)SecurityProfile).WorkloadIdentityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)SecurityProfile).WorkloadIdentityEnabled = value ?? default(bool); } /// Creates an new instance. public ConnectedClusterProperties() @@ -316,14 +316,20 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of AAD group object IDs that will have admin role of the cluster.", SerializedName = @"adminGroupObjectIDs", PossibleTypes = new [] { typeof(string) })] - string[] AadProfileAdminGroupObjectID { get; set; } + System.Collections.Generic.List AadProfileAdminGroupObjectID { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", SerializedName = @"enableAzureRBAC", PossibleTypes = new [] { typeof(bool) })] @@ -334,6 +340,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", SerializedName = @"tenantID", PossibleTypes = new [] { typeof(string) })] @@ -344,6 +353,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.", SerializedName = @"agentPublicKeyCertificate", PossibleTypes = new [] { typeof(string) })] @@ -352,6 +364,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Version of the agent running on the connected cluster resource", SerializedName = @"agentVersion", PossibleTypes = new [] { typeof(string) })] @@ -362,22 +377,32 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.", SerializedName = @"agentAutoUpgrade", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? ArcAgentProfileAgentAutoUpgrade { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string ArcAgentProfileAgentAutoUpgrade { get; set; } /// List of arc agentry and system components errors on the cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of arc agentry and system components errors on the cluster resource.", SerializedName = @"agentErrors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError) })] + System.Collections.Generic.List ArcAgentProfileAgentError { get; set; } /// Represents the current state of the Arc agentry and its dependent components. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the current state of the Arc agentry and its dependent components.", SerializedName = @"agentState", PossibleTypes = new [] { typeof(string) })] @@ -386,6 +411,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the Arc agents to be installed on the cluster resource", SerializedName = @"desiredAgentVersion", PossibleTypes = new [] { typeof(string) })] @@ -394,38 +422,55 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of system extensions that are installed on the cluster resource.", SerializedName = @"systemComponents", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent) })] + System.Collections.Generic.List ArcAgentProfileSystemComponent { get; set; } /// Configuration settings for customizing the behavior of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings for customizing the behavior of the connected cluster.", SerializedName = @"arcAgentryConfigurations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations) })] + System.Collections.Generic.List ArcAgentryConfiguration { get; set; } /// Indicates whether Azure Hybrid Benefit is opted in [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the connectivity status of the connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the connectivity status of the connected cluster.", SerializedName = @"connectivityStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? ConnectivityStatus { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Connecting", "Connected", "Offline", "Expired")] + string ConnectivityStatus { get; } /// The Kubernetes distribution running on this connected cluster. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Kubernetes distribution running on this connected cluster.", SerializedName = @"distribution", PossibleTypes = new [] { typeof(string) })] @@ -434,6 +479,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Kubernetes distribution version on this connected cluster.", SerializedName = @"distributionVersion", PossibleTypes = new [] { typeof(string) })] @@ -442,6 +490,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the gateway for arc router connectivity is enabled.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -450,6 +501,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The resource ID of the gateway used for the Arc router feature.", SerializedName = @"resourceId", PossibleTypes = new [] { typeof(string) })] @@ -460,6 +514,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on.", SerializedName = @"infrastructure", PossibleTypes = new [] { typeof(string) })] @@ -468,6 +525,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The Kubernetes version of the connected cluster resource", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] @@ -478,6 +538,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Time representing the last instance when heart beat was received from the cluster", SerializedName = @"lastConnectivityTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -486,6 +549,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Expiration time of the managed identity certificate", SerializedName = @"managedIdentityCertificateExpirationTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -494,14 +560,20 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"More properties related to the Connected Cluster", SerializedName = @"miscellaneousProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; } /// Connected cluster offering [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Connected cluster offering", SerializedName = @"offering", PossibleTypes = new [] { typeof(string) })] @@ -510,6 +582,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable oidc issuer for workload identity integration.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -520,6 +595,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The issuer url for hybrid clusters connected to Arc used for the workload identity feature.", SerializedName = @"issuerUrl", PossibleTypes = new [] { typeof(string) })] @@ -530,6 +608,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature.", SerializedName = @"selfHostedIssuerUrl", PossibleTypes = new [] { typeof(string) })] @@ -541,6 +622,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any.", SerializedName = @"privateLinkScopeResourceId", PossibleTypes = new [] { typeof(string) })] @@ -551,22 +635,33 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Property which describes the state of private link on a connected cluster resource.", SerializedName = @"privateLinkState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? PrivateLinkState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PrivateLinkState { get; set; } /// Provisioning state of the connected cluster resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of the connected cluster resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } /// Number of CPU cores present in the connected cluster resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of CPU cores present in the connected cluster resource", SerializedName = @"totalCoreCount", PossibleTypes = new [] { typeof(int) })] @@ -575,6 +670,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of nodes present in the connected cluster resource", SerializedName = @"totalNodeCount", PossibleTypes = new [] { typeof(int) })] @@ -583,6 +681,9 @@ public partial interface IConnectedClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable or disable the workload identity Webhook", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -594,9 +695,9 @@ internal partial interface IConnectedClusterPropertiesInternal { /// AAD profile for the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAadProfile AadProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAadProfile AadProfile { get; set; } /// The list of AAD group object IDs that will have admin role of the cluster. - string[] AadProfileAdminGroupObjectID { get; set; } + System.Collections.Generic.List AadProfileAdminGroupObjectID { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. bool? AadProfileEnableAzureRbac { get; set; } /// @@ -610,31 +711,34 @@ internal partial interface IConnectedClusterPropertiesInternal /// Version of the agent running on the connected cluster resource string AgentVersion { get; set; } /// Arc agentry configuration for the provisioned cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentProfile ArcAgentProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentProfile ArcAgentProfile { get; set; } /// /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions? ArcAgentProfileAgentAutoUpgrade { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string ArcAgentProfileAgentAutoUpgrade { get; set; } /// List of arc agentry and system components errors on the cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get; set; } + System.Collections.Generic.List ArcAgentProfileAgentError { get; set; } /// Represents the current state of the Arc agentry and its dependent components. string ArcAgentProfileAgentState { get; set; } /// Version of the Arc agents to be installed on the cluster resource string ArcAgentProfileDesiredAgentVersion { get; set; } /// List of system extensions that are installed on the cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get; set; } + System.Collections.Generic.List ArcAgentProfileSystemComponent { get; set; } /// Configuration settings for customizing the behavior of the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get; set; } + System.Collections.Generic.List ArcAgentryConfiguration { get; set; } /// Indicates whether Azure Hybrid Benefit is opted in - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit? AzureHybridBenefit { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + string AzureHybridBenefit { get; set; } /// Represents the connectivity status of the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus? ConnectivityStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Connecting", "Connected", "Offline", "Expired")] + string ConnectivityStatus { get; set; } /// The Kubernetes distribution running on this connected cluster. string Distribution { get; set; } /// The Kubernetes distribution version on this connected cluster. string DistributionVersion { get; set; } /// Details of the gateway used by the Arc router for connectivity. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway Gateway { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway Gateway { get; set; } /// Indicates whether the gateway for arc router connectivity is enabled. bool? GatewayEnabled { get; set; } /// The resource ID of the gateway used for the Arc router feature. @@ -652,11 +756,11 @@ internal partial interface IConnectedClusterPropertiesInternal /// Expiration time of the managed identity certificate global::System.DateTime? ManagedIdentityCertificateExpirationTime { get; set; } /// More properties related to the Connected Cluster - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties MiscellaneousProperty { get; set; } /// Connected cluster offering string Offering { get; set; } /// Open ID Connect (OIDC) Issuer Profile for the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile OidcIssuerProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile OidcIssuerProfile { get; set; } /// Whether to enable oidc issuer for workload identity integration. bool? OidcIssuerProfileEnabled { get; set; } /// @@ -675,13 +779,15 @@ internal partial interface IConnectedClusterPropertiesInternal /// /// Property which describes the state of private link on a connected cluster resource. /// - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState? PrivateLinkState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PrivateLinkState { get; set; } /// Provisioning state of the connected cluster resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + string ProvisioningState { get; set; } /// Security profile for the connected cluster. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile SecurityProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile SecurityProfile { get; set; } /// The workload identity feature webhook. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } /// Number of CPU cores present in the connected cluster resource int? TotalCoreCount { get; set; } /// Number of nodes present in the connected cluster resource diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.json.cs similarity index 88% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.json.cs index 4597b1eb97d5..ba99c1752429 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterProperties.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,40 +65,40 @@ internal ConnectedClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.Connected { return; } - {_aadProfile = If( json?.PropertyT("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.AadProfile.FromJson(__jsonAadProfile) : AadProfile;} - {_arcAgentProfile = If( json?.PropertyT("arcAgentProfile"), out var __jsonArcAgentProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentProfile.FromJson(__jsonArcAgentProfile) : ArcAgentProfile;} - {_securityProfile = If( json?.PropertyT("securityProfile"), out var __jsonSecurityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfile.FromJson(__jsonSecurityProfile) : SecurityProfile;} - {_oidcIssuerProfile = If( json?.PropertyT("oidcIssuerProfile"), out var __jsonOidcIssuerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OidcIssuerProfile.FromJson(__jsonOidcIssuerProfile) : OidcIssuerProfile;} - {_gateway = If( json?.PropertyT("gateway"), out var __jsonGateway) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Gateway.FromJson(__jsonGateway) : Gateway;} - {_agentPublicKeyCertificate = If( json?.PropertyT("agentPublicKeyCertificate"), out var __jsonAgentPublicKeyCertificate) ? (string)__jsonAgentPublicKeyCertificate : (string)AgentPublicKeyCertificate;} - {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)KubernetesVersion;} - {_totalNodeCount = If( json?.PropertyT("totalNodeCount"), out var __jsonTotalNodeCount) ? (int?)__jsonTotalNodeCount : TotalNodeCount;} - {_totalCoreCount = If( json?.PropertyT("totalCoreCount"), out var __jsonTotalCoreCount) ? (int?)__jsonTotalCoreCount : TotalCoreCount;} - {_agentVersion = If( json?.PropertyT("agentVersion"), out var __jsonAgentVersion) ? (string)__jsonAgentVersion : (string)AgentVersion;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_distribution = If( json?.PropertyT("distribution"), out var __jsonDistribution) ? (string)__jsonDistribution : (string)Distribution;} - {_distributionVersion = If( json?.PropertyT("distributionVersion"), out var __jsonDistributionVersion) ? (string)__jsonDistributionVersion : (string)DistributionVersion;} - {_infrastructure = If( json?.PropertyT("infrastructure"), out var __jsonInfrastructure) ? (string)__jsonInfrastructure : (string)Infrastructure;} - {_offering = If( json?.PropertyT("offering"), out var __jsonOffering) ? (string)__jsonOffering : (string)Offering;} - {_managedIdentityCertificateExpirationTime = If( json?.PropertyT("managedIdentityCertificateExpirationTime"), out var __jsonManagedIdentityCertificateExpirationTime) ? global::System.DateTime.TryParse((string)__jsonManagedIdentityCertificateExpirationTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonManagedIdentityCertificateExpirationTimeValue) ? __jsonManagedIdentityCertificateExpirationTimeValue : ManagedIdentityCertificateExpirationTime : ManagedIdentityCertificateExpirationTime;} - {_lastConnectivityTime = If( json?.PropertyT("lastConnectivityTime"), out var __jsonLastConnectivityTime) ? global::System.DateTime.TryParse((string)__jsonLastConnectivityTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastConnectivityTimeValue) ? __jsonLastConnectivityTimeValue : LastConnectivityTime : LastConnectivityTime;} - {_connectivityStatus = If( json?.PropertyT("connectivityStatus"), out var __jsonConnectivityStatus) ? (string)__jsonConnectivityStatus : (string)ConnectivityStatus;} - {_privateLinkState = If( json?.PropertyT("privateLinkState"), out var __jsonPrivateLinkState) ? (string)__jsonPrivateLinkState : (string)PrivateLinkState;} - {_privateLinkScopeResourceId = If( json?.PropertyT("privateLinkScopeResourceId"), out var __jsonPrivateLinkScopeResourceId) ? (string)__jsonPrivateLinkScopeResourceId : (string)PrivateLinkScopeResourceId;} - {_azureHybridBenefit = If( json?.PropertyT("azureHybridBenefit"), out var __jsonAzureHybridBenefit) ? (string)__jsonAzureHybridBenefit : (string)AzureHybridBenefit;} - {_arcAgentryConfiguration = If( json?.PropertyT("arcAgentryConfigurations"), out var __jsonArcAgentryConfigurations) ? If( __jsonArcAgentryConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ArcAgentryConfigurations.FromJson(__u) )) ))() : null : ArcAgentryConfiguration;} - {_miscellaneousProperty = If( json?.PropertyT("miscellaneousProperties"), out var __jsonMiscellaneousProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties.FromJson(__jsonMiscellaneousProperties) : MiscellaneousProperty;} + {_aadProfile = If( json?.PropertyT("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AadProfile.FromJson(__jsonAadProfile) : _aadProfile;} + {_arcAgentProfile = If( json?.PropertyT("arcAgentProfile"), out var __jsonArcAgentProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentProfile.FromJson(__jsonArcAgentProfile) : _arcAgentProfile;} + {_securityProfile = If( json?.PropertyT("securityProfile"), out var __jsonSecurityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfile.FromJson(__jsonSecurityProfile) : _securityProfile;} + {_oidcIssuerProfile = If( json?.PropertyT("oidcIssuerProfile"), out var __jsonOidcIssuerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OidcIssuerProfile.FromJson(__jsonOidcIssuerProfile) : _oidcIssuerProfile;} + {_gateway = If( json?.PropertyT("gateway"), out var __jsonGateway) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Gateway.FromJson(__jsonGateway) : _gateway;} + {_agentPublicKeyCertificate = If( json?.PropertyT("agentPublicKeyCertificate"), out var __jsonAgentPublicKeyCertificate) ? (string)__jsonAgentPublicKeyCertificate : (string)_agentPublicKeyCertificate;} + {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)_kubernetesVersion;} + {_totalNodeCount = If( json?.PropertyT("totalNodeCount"), out var __jsonTotalNodeCount) ? (int?)__jsonTotalNodeCount : _totalNodeCount;} + {_totalCoreCount = If( json?.PropertyT("totalCoreCount"), out var __jsonTotalCoreCount) ? (int?)__jsonTotalCoreCount : _totalCoreCount;} + {_agentVersion = If( json?.PropertyT("agentVersion"), out var __jsonAgentVersion) ? (string)__jsonAgentVersion : (string)_agentVersion;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_distribution = If( json?.PropertyT("distribution"), out var __jsonDistribution) ? (string)__jsonDistribution : (string)_distribution;} + {_distributionVersion = If( json?.PropertyT("distributionVersion"), out var __jsonDistributionVersion) ? (string)__jsonDistributionVersion : (string)_distributionVersion;} + {_infrastructure = If( json?.PropertyT("infrastructure"), out var __jsonInfrastructure) ? (string)__jsonInfrastructure : (string)_infrastructure;} + {_offering = If( json?.PropertyT("offering"), out var __jsonOffering) ? (string)__jsonOffering : (string)_offering;} + {_managedIdentityCertificateExpirationTime = If( json?.PropertyT("managedIdentityCertificateExpirationTime"), out var __jsonManagedIdentityCertificateExpirationTime) ? global::System.DateTime.TryParse((string)__jsonManagedIdentityCertificateExpirationTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonManagedIdentityCertificateExpirationTimeValue) ? __jsonManagedIdentityCertificateExpirationTimeValue : _managedIdentityCertificateExpirationTime : _managedIdentityCertificateExpirationTime;} + {_lastConnectivityTime = If( json?.PropertyT("lastConnectivityTime"), out var __jsonLastConnectivityTime) ? global::System.DateTime.TryParse((string)__jsonLastConnectivityTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastConnectivityTimeValue) ? __jsonLastConnectivityTimeValue : _lastConnectivityTime : _lastConnectivityTime;} + {_connectivityStatus = If( json?.PropertyT("connectivityStatus"), out var __jsonConnectivityStatus) ? (string)__jsonConnectivityStatus : (string)_connectivityStatus;} + {_privateLinkState = If( json?.PropertyT("privateLinkState"), out var __jsonPrivateLinkState) ? (string)__jsonPrivateLinkState : (string)_privateLinkState;} + {_privateLinkScopeResourceId = If( json?.PropertyT("privateLinkScopeResourceId"), out var __jsonPrivateLinkScopeResourceId) ? (string)__jsonPrivateLinkScopeResourceId : (string)_privateLinkScopeResourceId;} + {_azureHybridBenefit = If( json?.PropertyT("azureHybridBenefit"), out var __jsonAzureHybridBenefit) ? (string)__jsonAzureHybridBenefit : (string)_azureHybridBenefit;} + {_arcAgentryConfiguration = If( json?.PropertyT("arcAgentryConfigurations"), out var __jsonArcAgentryConfigurations) ? If( __jsonArcAgentryConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ArcAgentryConfigurations.FromJson(__u) )) ))() : null : _arcAgentryConfiguration;} + {_miscellaneousProperty = If( json?.PropertyT("miscellaneousProperties"), out var __jsonMiscellaneousProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties.FromJson(__jsonMiscellaneousProperties) : _miscellaneousProperty;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterProperties(json) : null; } @@ -128,19 +128,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN AddIf( null != this._oidcIssuerProfile ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._oidcIssuerProfile.ToJson(null,serializationMode) : null, "oidcIssuerProfile" ,container.Add ); AddIf( null != this._gateway ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._gateway.ToJson(null,serializationMode) : null, "gateway" ,container.Add ); AddIf( null != (((object)this._agentPublicKeyCertificate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._agentPublicKeyCertificate.ToString()) : null, "agentPublicKeyCertificate" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._kubernetesVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._kubernetesVersion.ToString()) : null, "kubernetesVersion" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._totalNodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNumber((int)this._totalNodeCount) : null, "totalNodeCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._totalCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNumber((int)this._totalCoreCount) : null, "totalCoreCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._agentVersion.ToString()) : null, "agentVersion" ,container.Add ); } @@ -148,19 +148,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN AddIf( null != (((object)this._distribution)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._distribution.ToString()) : null, "distribution" ,container.Add ); AddIf( null != (((object)this._distributionVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._distributionVersion.ToString()) : null, "distributionVersion" ,container.Add ); AddIf( null != (((object)this._infrastructure)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._infrastructure.ToString()) : null, "infrastructure" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._offering)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._offering.ToString()) : null, "offering" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._managedIdentityCertificateExpirationTime ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._managedIdentityCertificateExpirationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "managedIdentityCertificateExpirationTime" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._lastConnectivityTime ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._lastConnectivityTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastConnectivityTime" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._connectivityStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._connectivityStatus.ToString()) : null, "connectivityStatus" ,container.Add ); } @@ -176,7 +176,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN } container.Add("arcAgentryConfigurations",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._miscellaneousProperty ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._miscellaneousProperty.ToJson(null,serializationMode) : null, "miscellaneousProperties" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.PowerShell.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.PowerShell.cs index 94bde6afe87d..d80a8d302630 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectedClusterPropertiesMiscellaneousProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -82,7 +82,7 @@ internal ConnectedClusterPropertiesMiscellaneousProperties(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. @@ -101,29 +101,29 @@ internal ConnectedClusterPropertiesMiscellaneousProperties(global::System.Manage } /// - /// 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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectedClusterPropertiesMiscellaneousProperties(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.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectedClusterPropertiesMiscellaneousProperties(content); } @@ -136,7 +136,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.TypeConverter.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.TypeConverter.cs index 1465b277d5a4..b1f5559abf10 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.cs similarity index 88% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.cs index 0c4f9fab3c18..885b54bb562d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// More properties related to the Connected Cluster public partial class ConnectedClusterPropertiesMiscellaneousProperties : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousPropertiesInternal { /// diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.dictionary.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.dictionary.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.dictionary.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.dictionary.cs index b8d77add874b..905758191bf7 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.dictionary.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPropertiesMiscellaneousProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPropertiesMiscellaneousProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.json.cs index 9a39e68677c8..d93fa762c441 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ConnectedClusterPropertiesMiscellaneousProperties.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedClusterPropertiesMiscellaneousProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -72,13 +72,13 @@ internal ConnectedClusterPropertiesMiscellaneousProperties(Microsoft.Azure.Power } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPropertiesMiscellaneousProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPropertiesMiscellaneousProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPropertiesMiscellaneousProperties(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.cs index 5eeab3a9b73b..1d8f2553ce2f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.cs @@ -53,6 +53,9 @@ public partial interface IConnectedKubernetesIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Kubernetes cluster on which get is called.", SerializedName = @"clusterName", PossibleTypes = new [] { typeof(string) })] @@ -61,6 +64,9 @@ public partial interface IConnectedKubernetesIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -69,6 +75,9 @@ public partial interface IConnectedKubernetesIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] @@ -77,6 +86,9 @@ public partial interface IConnectedKubernetesIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.json.cs index 83f24ddfb8b2..21e09109af15 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ConnectedKubernetesIdentity.json.cs @@ -64,10 +64,10 @@ internal ConnectedKubernetesIdentity(Microsoft.Azure.PowerShell.Cmdlets.Connecte { return; } - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)_clusterName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.PowerShell.cs similarity index 79% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.PowerShell.cs index 67af98b956e8..7931aab85f8b 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CredentialResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal CredentialResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Value, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Value, i => i); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal CredentialResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal)this).Value, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal)this).Value, i => i); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CredentialResult(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.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CredentialResult(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.TypeConverter.cs index c72ba2e50268..13e256962f9c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.cs similarity index 88% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.cs index 2ff539a58304..6d26c57383bd 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The credential result response. public partial class CredentialResult : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal { /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Value - byte[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultInternal.Value { get => this._value; set { {_value = value;} } } + byte[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _name; @@ -47,6 +47,9 @@ public partial interface ICredentialResult : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the credential.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -55,6 +58,9 @@ public partial interface ICredentialResult : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Base64-encoded Kubernetes configuration file.", SerializedName = @"value", PossibleTypes = new [] { typeof(byte[]) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.json.cs index 9c98b79bbe10..e1381f434ad2 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResult.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResult.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CredentialResult(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} {_value = If( json?.PropertyT("value"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new CredentialResult(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._value ? global::System.Convert.ToBase64String( this._value) : null ,(v)=> container.Add( "value",v) ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.PowerShell.cs similarity index 56% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.PowerShell.cs index 7516c93dcb3e..7017c7243a44 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CredentialResults partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,41 +78,41 @@ internal CredentialResults(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("HybridConnectionConfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig) content.GetValueForProperty("HybridConnectionConfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfig, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfigTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig) content.GetValueForProperty("HybridConnectionConfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfig, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfigTypeConverter.ConvertFrom); } if (content.Contains("Kubeconfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).Kubeconfig = (System.Collections.Generic.List) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResultTypeConverter.ConvertFrom)); } if (content.Contains("HybridConnectionConfigExpirationTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime = (long?) content.GetValueForProperty("HybridConnectionConfigExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime = (long?) content.GetValueForProperty("HybridConnectionConfigExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("HybridConnectionConfigRelay")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelay = (string) content.GetValueForProperty("HybridConnectionConfigRelay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelay, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelay = (string) content.GetValueForProperty("HybridConnectionConfigRelay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelay, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigToken")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigToken = (string) content.GetValueForProperty("HybridConnectionConfigToken",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigToken, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigToken = (string) content.GetValueForProperty("HybridConnectionConfigToken",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigToken, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigRelayTid")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid = (string) content.GetValueForProperty("HybridConnectionConfigRelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid = (string) content.GetValueForProperty("HybridConnectionConfigRelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigRelayType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayType = (string) content.GetValueForProperty("HybridConnectionConfigRelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayType = (string) content.GetValueForProperty("HybridConnectionConfigRelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayType, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigHybridConnectionName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName = (string) content.GetValueForProperty("HybridConnectionConfigHybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName = (string) content.GetValueForProperty("HybridConnectionConfigHybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName, 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,63 +127,61 @@ internal CredentialResults(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("HybridConnectionConfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig) content.GetValueForProperty("HybridConnectionConfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfig, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfigTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig) content.GetValueForProperty("HybridConnectionConfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfig, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfigTypeConverter.ConvertFrom); } if (content.Contains("Kubeconfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).Kubeconfig = (System.Collections.Generic.List) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResultTypeConverter.ConvertFrom)); } if (content.Contains("HybridConnectionConfigExpirationTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime = (long?) content.GetValueForProperty("HybridConnectionConfigExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime = (long?) content.GetValueForProperty("HybridConnectionConfigExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("HybridConnectionConfigRelay")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelay = (string) content.GetValueForProperty("HybridConnectionConfigRelay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelay, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelay = (string) content.GetValueForProperty("HybridConnectionConfigRelay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelay, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigToken")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigToken = (string) content.GetValueForProperty("HybridConnectionConfigToken",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigToken, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigToken = (string) content.GetValueForProperty("HybridConnectionConfigToken",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigToken, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigRelayTid")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid = (string) content.GetValueForProperty("HybridConnectionConfigRelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid = (string) content.GetValueForProperty("HybridConnectionConfigRelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayTid, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigRelayType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayType = (string) content.GetValueForProperty("HybridConnectionConfigRelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigRelayType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayType = (string) content.GetValueForProperty("HybridConnectionConfigRelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigRelayType, global::System.Convert.ToString); } if (content.Contains("HybridConnectionConfigHybridConnectionName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName = (string) content.GetValueForProperty("HybridConnectionConfigHybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName = (string) content.GetValueForProperty("HybridConnectionConfigHybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal)this).HybridConnectionConfigHybridConnectionName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CredentialResults(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.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CredentialResults(content); } @@ -193,7 +191,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.TypeConverter.cs index 2d5b60ea8551..46e4438757d2 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.cs similarity index 61% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.cs index 7bffcbc57b3a..58554362b9b4 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.cs @@ -3,77 +3,77 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The list of credential result response. public partial class CredentialResults : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig _hybridConnectionConfig; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig _hybridConnectionConfig; /// Contains the REP (rendezvous endpoint) and “Sender” access token. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig HybridConnectionConfig { get => (this._hybridConnectionConfig = this._hybridConnectionConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig HybridConnectionConfig { get => (this._hybridConnectionConfig = this._hybridConnectionConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig()); } /// Timestamp when this token will be expired. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public long? HybridConnectionConfigExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).ExpirationTime; } + public long? HybridConnectionConfigExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).ExpirationTime; } /// Name of the connection [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string HybridConnectionConfigHybridConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).HybridConnectionName; } + public string HybridConnectionConfigHybridConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).HybridConnectionName; } /// Name of the relay. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string HybridConnectionConfigRelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).Relay; } + public string HybridConnectionConfigRelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).Relay; } /// TenantID of the relay [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string HybridConnectionConfigRelayTid { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayTid; } + public string HybridConnectionConfigRelayTid { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayTid; } /// Type of relay [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string HybridConnectionConfigRelayType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayType; } + public string HybridConnectionConfigRelayType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayType; } /// Sender access token [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string HybridConnectionConfigToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).Token; } + public string HybridConnectionConfigToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).Token; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[] _kubeconfig; + private System.Collections.Generic.List _kubeconfig; /// Base64-encoded Kubernetes configuration file. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[] Kubeconfig { get => this._kubeconfig; } + public System.Collections.Generic.List Kubeconfig { get => this._kubeconfig; } /// Internal Acessors for HybridConnectionConfig - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfig { get => (this._hybridConnectionConfig = this._hybridConnectionConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig()); set { {_hybridConnectionConfig = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfig { get => (this._hybridConnectionConfig = this._hybridConnectionConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig()); set { {_hybridConnectionConfig = value;} } } /// Internal Acessors for HybridConnectionConfigExpirationTime - long? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfigExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).ExpirationTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).ExpirationTime = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfigExpirationTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).ExpirationTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).ExpirationTime = value; } /// Internal Acessors for HybridConnectionConfigHybridConnectionName - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfigHybridConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).HybridConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).HybridConnectionName = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfigHybridConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).HybridConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).HybridConnectionName = value; } /// Internal Acessors for HybridConnectionConfigRelay - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfigRelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).Relay; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).Relay = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfigRelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).Relay; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).Relay = value; } /// Internal Acessors for HybridConnectionConfigRelayTid - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfigRelayTid { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayTid; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayTid = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfigRelayTid { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayTid; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayTid = value; } /// Internal Acessors for HybridConnectionConfigRelayType - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfigRelayType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfigRelayType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).RelayType = value; } /// Internal Acessors for HybridConnectionConfigToken - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.HybridConnectionConfigToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).Token; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)HybridConnectionConfig).Token = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.HybridConnectionConfigToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).Token; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)HybridConnectionConfig).Token = value; } /// Internal Acessors for Kubeconfig - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResultsInternal.Kubeconfig { get => this._kubeconfig; set { {_kubeconfig = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResultsInternal.Kubeconfig { get => this._kubeconfig; set { {_kubeconfig = value;} } } /// Creates an new instance. public CredentialResults() @@ -89,6 +89,9 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Timestamp when this token will be expired.", SerializedName = @"expirationTime", PossibleTypes = new [] { typeof(long) })] @@ -97,6 +100,9 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the connection", SerializedName = @"hybridConnectionName", PossibleTypes = new [] { typeof(string) })] @@ -105,6 +111,9 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the relay.", SerializedName = @"relay", PossibleTypes = new [] { typeof(string) })] @@ -113,6 +122,9 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantID of the relay", SerializedName = @"relayTid", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +133,9 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Type of relay", SerializedName = @"relayType", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +144,9 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Sender access token", SerializedName = @"token", PossibleTypes = new [] { typeof(string) })] @@ -137,10 +155,13 @@ public partial interface ICredentialResults : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Base64-encoded Kubernetes configuration file.", SerializedName = @"kubeconfigs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[] Kubeconfig { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult) })] + System.Collections.Generic.List Kubeconfig { get; } } /// The list of credential result response. @@ -148,7 +169,7 @@ internal partial interface ICredentialResultsInternal { /// Contains the REP (rendezvous endpoint) and “Sender” access token. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig HybridConnectionConfig { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig HybridConnectionConfig { get; set; } /// Timestamp when this token will be expired. long? HybridConnectionConfigExpirationTime { get; set; } /// Name of the connection @@ -162,7 +183,7 @@ internal partial interface ICredentialResultsInternal /// Sender access token string HybridConnectionConfigToken { get; set; } /// Base64-encoded Kubernetes configuration file. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult[] Kubeconfig { get; set; } + System.Collections.Generic.List Kubeconfig { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.json.cs similarity index 89% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.json.cs index 2192e4adba49..03996a15bff9 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/CredentialResults.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/CredentialResults.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CredentialResults(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernete { return; } - {_hybridConnectionConfig = If( json?.PropertyT("hybridConnectionConfig"), out var __jsonHybridConnectionConfig) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.HybridConnectionConfig.FromJson(__jsonHybridConnectionConfig) : HybridConnectionConfig;} - {_kubeconfig = If( json?.PropertyT("kubeconfigs"), out var __jsonKubeconfigs) ? If( __jsonKubeconfigs as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResult) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.CredentialResult.FromJson(__u) )) ))() : null : Kubeconfig;} + {_hybridConnectionConfig = If( json?.PropertyT("hybridConnectionConfig"), out var __jsonHybridConnectionConfig) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.HybridConnectionConfig.FromJson(__jsonHybridConnectionConfig) : _hybridConnectionConfig;} + {_kubeconfig = If( json?.PropertyT("kubeconfigs"), out var __jsonKubeconfigs) ? If( __jsonKubeconfigs as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResult) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.CredentialResult.FromJson(__u) )) ))() : null : _kubeconfig;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new CredentialResults(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._hybridConnectionConfig ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._hybridConnectionConfig.ToJson(null,serializationMode) : null, "hybridConnectionConfig" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { if (null != this._kubeconfig) { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 79% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index df7f7053b891..c55e5c72ba61 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorAdditionalInfo partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -129,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index 3ec67c3bb856..75dd6cabffb7 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 87% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index 5cc4895557f4..6d50f6343998 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The resource management error additional info. public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -47,6 +47,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info.", SerializedName = @"info", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAny) })] @@ -55,6 +58,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index 97d9c47083ed..6a4d297504e2 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKuberne { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Any.FromJson(__jsonInfo) : Info;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs similarity index 66% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs index 0a4c3235f42e..6b81fbebd392 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorDetail partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorDetail(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorDetail(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,29 +104,29 @@ internal ErrorDetail(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,23 +141,23 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -167,7 +167,7 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs index fd52df4c19d0..f1f01b7c290c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.cs similarity index 67% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.cs index 310c80107e1a..f8ae7190f22b 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The error detail. public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } /// Backing field for property. private string _code; @@ -28,11 +28,11 @@ public partial class ErrorDetail : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Detail { get => this._detail; } + public System.Collections.Generic.List Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -42,19 +42,19 @@ public partial class ErrorDetail : public string Message { get => this._message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } /// Backing field for property. private string _target; @@ -77,14 +77,20 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -93,14 +99,20 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +121,9 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -120,11 +135,11 @@ internal partial interface IErrorDetailInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.json.cs similarity index 88% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.json.cs index a3013da3a194..d7686755140e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runt { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; } @@ -104,19 +104,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +128,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs similarity index 64% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs index b2953a55dd65..bb9ad58df576 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -66,33 +66,33 @@ public partial class ErrorResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,33 +107,33 @@ internal ErrorResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -148,27 +148,27 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -178,7 +178,7 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs index b0d3c442b165..d0b27fcad3cc 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.cs similarity index 59% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.cs index 347be7be946f..4b1feb9c3f0c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -12,54 +12,54 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 /// the OData error response format.). /// public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetailInternal)Error).Target; } /// Creates an new instance. public ErrorResponse() @@ -76,14 +76,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -92,14 +98,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -108,6 +120,9 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -120,13 +135,13 @@ internal partial interface IErrorResponseInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorDetail Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.json.cs index 3c56f7a5cf6f..c79d68c6437e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -68,18 +68,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Ru { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ErrorDetail.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.PowerShell.cs similarity index 79% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.PowerShell.cs index 18d4907af542..41d9806419d6 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -62,27 +62,27 @@ public partial class Gateway 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.ConnectedKubernetes.Models.Api20240715Preview.IGateway DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Gateway(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.ConnectedKubernetes.Models.Api20240715Preview.IGateway DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Gateway(content); } @@ -92,10 +92,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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. @@ -110,17 +110,17 @@ internal Gateway(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).ResourceId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -135,11 +135,11 @@ internal Gateway(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal)this).ResourceId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.TypeConverter.cs index 4277a72691e0..e2c743fed231 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.cs index 06a48a8de70d..b4e8f1c5eec1 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; public partial class Gateway : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGatewayInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGatewayInternal { /// Backing field for property. @@ -39,6 +39,9 @@ public partial interface IGateway : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the gateway for arc router connectivity is enabled.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -47,6 +50,9 @@ public partial interface IGateway : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The resource ID of the gateway used for the Arc router feature.", SerializedName = @"resourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.json.cs index 0e8956b6f372..72c88ce4522c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Gateway.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Gateway.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class Gateway partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IGateway FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IGateway FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new Gateway(json) : null; } @@ -76,8 +76,8 @@ internal Gateway(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime. { return; } - {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled;} - {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)_resourceId;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.PowerShell.cs similarity index 66% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.PowerShell.cs index aad7856b2d1c..4fabde71b8e4 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class HybridConnectionConfig 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.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HybridConnectionConfig(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.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HybridConnectionConfig(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +111,33 @@ internal HybridConnectionConfig(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ExpirationTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).ExpirationTime = (long?) content.GetValueForProperty("ExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).ExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).ExpirationTime = (long?) content.GetValueForProperty("ExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).ExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("HybridConnectionName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).HybridConnectionName = (string) content.GetValueForProperty("HybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).HybridConnectionName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).HybridConnectionName = (string) content.GetValueForProperty("HybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).HybridConnectionName, global::System.Convert.ToString); } if (content.Contains("Relay")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Relay = (string) content.GetValueForProperty("Relay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Relay, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Relay = (string) content.GetValueForProperty("Relay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Relay, global::System.Convert.ToString); } if (content.Contains("Token")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Token = (string) content.GetValueForProperty("Token",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Token, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Token = (string) content.GetValueForProperty("Token",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Token, global::System.Convert.ToString); } if (content.Contains("RelayTid")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayTid = (string) content.GetValueForProperty("RelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayTid, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayTid = (string) content.GetValueForProperty("RelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayTid, global::System.Convert.ToString); } if (content.Contains("RelayType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayType = (string) content.GetValueForProperty("RelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayType = (string) content.GetValueForProperty("RelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayType, 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. @@ -154,27 +152,27 @@ internal HybridConnectionConfig(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("ExpirationTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).ExpirationTime = (long?) content.GetValueForProperty("ExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).ExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).ExpirationTime = (long?) content.GetValueForProperty("ExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).ExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("HybridConnectionName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).HybridConnectionName = (string) content.GetValueForProperty("HybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).HybridConnectionName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).HybridConnectionName = (string) content.GetValueForProperty("HybridConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).HybridConnectionName, global::System.Convert.ToString); } if (content.Contains("Relay")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Relay = (string) content.GetValueForProperty("Relay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Relay, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Relay = (string) content.GetValueForProperty("Relay",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Relay, global::System.Convert.ToString); } if (content.Contains("Token")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Token = (string) content.GetValueForProperty("Token",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).Token, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Token = (string) content.GetValueForProperty("Token",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).Token, global::System.Convert.ToString); } if (content.Contains("RelayTid")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayTid = (string) content.GetValueForProperty("RelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayTid, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayTid = (string) content.GetValueForProperty("RelayTid",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayTid, global::System.Convert.ToString); } if (content.Contains("RelayType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayType = (string) content.GetValueForProperty("RelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal)this).RelayType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayType = (string) content.GetValueForProperty("RelayType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal)this).RelayType, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.TypeConverter.cs index 5cb4f7878be5..fb2fa5836536 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.cs similarity index 85% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.cs index 62af7ff3d559..c7d117bfa46c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Contains the REP (rendezvous endpoint) and “Sender” access token. public partial class HybridConnectionConfig : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal { /// Backing field for property. @@ -28,22 +28,22 @@ public partial class HybridConnectionConfig : public string HybridConnectionName { get => this._hybridConnectionName; } /// Internal Acessors for ExpirationTime - long? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal.ExpirationTime { get => this._expirationTime; set { {_expirationTime = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal.ExpirationTime { get => this._expirationTime; set { {_expirationTime = value;} } } /// Internal Acessors for HybridConnectionName - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal.HybridConnectionName { get => this._hybridConnectionName; set { {_hybridConnectionName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal.HybridConnectionName { get => this._hybridConnectionName; set { {_hybridConnectionName = value;} } } /// Internal Acessors for Relay - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal.Relay { get => this._relay; set { {_relay = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal.Relay { get => this._relay; set { {_relay = value;} } } /// Internal Acessors for RelayTid - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal.RelayTid { get => this._relayTid; set { {_relayTid = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal.RelayTid { get => this._relayTid; set { {_relayTid = value;} } } /// Internal Acessors for RelayType - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal.RelayType { get => this._relayType; set { {_relayType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal.RelayType { get => this._relayType; set { {_relayType = value;} } } /// Internal Acessors for Token - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfigInternal.Token { get => this._token; set { {_token = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfigInternal.Token { get => this._token; set { {_token = value;} } } /// Backing field for property. private string _relay; @@ -87,6 +87,9 @@ public partial interface IHybridConnectionConfig : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Timestamp when this token will be expired.", SerializedName = @"expirationTime", PossibleTypes = new [] { typeof(long) })] @@ -95,6 +98,9 @@ public partial interface IHybridConnectionConfig : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the connection", SerializedName = @"hybridConnectionName", PossibleTypes = new [] { typeof(string) })] @@ -103,6 +109,9 @@ public partial interface IHybridConnectionConfig : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the relay.", SerializedName = @"relay", PossibleTypes = new [] { typeof(string) })] @@ -111,6 +120,9 @@ public partial interface IHybridConnectionConfig : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantID of the relay", SerializedName = @"relayTid", PossibleTypes = new [] { typeof(string) })] @@ -119,6 +131,9 @@ public partial interface IHybridConnectionConfig : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Type of relay", SerializedName = @"relayType", PossibleTypes = new [] { typeof(string) })] @@ -127,6 +142,9 @@ public partial interface IHybridConnectionConfig : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Sender access token", SerializedName = @"token", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.json.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.json.cs index 74a8f8b94978..1785938366a4 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/HybridConnectionConfig.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/HybridConnectionConfig.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HybridConnectionConfig partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IHybridConnectionConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IHybridConnectionConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new HybridConnectionConfig(json) : null; } @@ -77,12 +77,12 @@ internal HybridConnectionConfig(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKube { return; } - {_expirationTime = If( json?.PropertyT("expirationTime"), out var __jsonExpirationTime) ? (long?)__jsonExpirationTime : ExpirationTime;} - {_hybridConnectionName = If( json?.PropertyT("hybridConnectionName"), out var __jsonHybridConnectionName) ? (string)__jsonHybridConnectionName : (string)HybridConnectionName;} - {_relay = If( json?.PropertyT("relay"), out var __jsonRelay) ? (string)__jsonRelay : (string)Relay;} - {_token = If( json?.PropertyT("token"), out var __jsonToken) ? (string)__jsonToken : (string)Token;} - {_relayTid = If( json?.PropertyT("relayTid"), out var __jsonRelayTid) ? (string)__jsonRelayTid : (string)RelayTid;} - {_relayType = If( json?.PropertyT("relayType"), out var __jsonRelayType) ? (string)__jsonRelayType : (string)RelayType;} + {_expirationTime = If( json?.PropertyT("expirationTime"), out var __jsonExpirationTime) ? (long?)__jsonExpirationTime : _expirationTime;} + {_hybridConnectionName = If( json?.PropertyT("hybridConnectionName"), out var __jsonHybridConnectionName) ? (string)__jsonHybridConnectionName : (string)_hybridConnectionName;} + {_relay = If( json?.PropertyT("relay"), out var __jsonRelay) ? (string)__jsonRelay : (string)_relay;} + {_token = If( json?.PropertyT("token"), out var __jsonToken) ? (string)__jsonToken : (string)_token;} + {_relayTid = If( json?.PropertyT("relayTid"), out var __jsonRelayTid) ? (string)__jsonRelayTid : (string)_relayTid;} + {_relayType = If( json?.PropertyT("relayType"), out var __jsonRelayType) ? (string)__jsonRelayType : (string)_relayType;} AfterFromJson(json); } @@ -105,27 +105,27 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._expirationTime ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNumber((long)this._expirationTime) : null, "expirationTime" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._hybridConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._hybridConnectionName.ToString()) : null, "hybridConnectionName" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._relay)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._relay.ToString()) : null, "relay" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._token)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._token.ToString()) : null, "token" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._relayTid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._relayTid.ToString()) : null, "relayTid" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._relayType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._relayType.ToString()) : null, "relayType" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.PowerShell.cs similarity index 74% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.PowerShell.cs index 92e3c5df12ca..7990ffd509a1 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -62,29 +62,29 @@ public partial class ListClusterUserCredentialProperties 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.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ListClusterUserCredentialProperties(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.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ListClusterUserCredentialProperties(content); } @@ -96,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -114,17 +114,17 @@ internal ListClusterUserCredentialProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("AuthenticationMethod")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod) content.GetValueForProperty("AuthenticationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod = (string) content.GetValueForProperty("AuthenticationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod, global::System.Convert.ToString); } if (content.Contains("ClientProxy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).ClientProxy = (bool) content.GetValueForProperty("ClientProxy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).ClientProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).ClientProxy = (bool) content.GetValueForProperty("ClientProxy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).ClientProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -139,11 +139,11 @@ internal ListClusterUserCredentialProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("AuthenticationMethod")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod) content.GetValueForProperty("AuthenticationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod = (string) content.GetValueForProperty("AuthenticationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).AuthenticationMethod, global::System.Convert.ToString); } if (content.Contains("ClientProxy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).ClientProxy = (bool) content.GetValueForProperty("ClientProxy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal)this).ClientProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).ClientProxy = (bool) content.GetValueForProperty("ClientProxy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal)this).ClientProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.TypeConverter.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.TypeConverter.cs index 2bb5b440cb80..7da0143ce711 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.cs similarity index 76% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.cs index 9138ff61da2d..a16afdcb6a0f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; public partial class ListClusterUserCredentialProperties : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod _authenticationMethod; + private string _authenticationMethod; /// The mode of client authentication. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod AuthenticationMethod { get => this._authenticationMethod; set => this._authenticationMethod = value; } + public string AuthenticationMethod { get => this._authenticationMethod; set => this._authenticationMethod = value; } /// Backing field for property. private bool _clientProxy; @@ -39,14 +39,21 @@ public partial interface IListClusterUserCredentialProperties : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The mode of client authentication.", SerializedName = @"authenticationMethod", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod AuthenticationMethod { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")] + string AuthenticationMethod { get; set; } /// Boolean value to indicate whether the request is for client side proxy or not [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Boolean value to indicate whether the request is for client side proxy or not", SerializedName = @"clientProxy", PossibleTypes = new [] { typeof(bool) })] @@ -57,7 +64,8 @@ internal partial interface IListClusterUserCredentialPropertiesInternal { /// The mode of client authentication. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod AuthenticationMethod { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")] + string AuthenticationMethod { get; set; } /// Boolean value to indicate whether the request is for client side proxy or not bool ClientProxy { get; set; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.json.cs index dcd92760c0f7..9a9d07798b98 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/ListClusterUserCredentialProperties.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/ListClusterUserCredentialProperties.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class ListClusterUserCredentialProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ListClusterUserCredentialProperties(json) : null; } @@ -76,8 +76,8 @@ internal ListClusterUserCredentialProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_authenticationMethod = If( json?.PropertyT("authenticationMethod"), out var __jsonAuthenticationMethod) ? (string)__jsonAuthenticationMethod : (string)AuthenticationMethod;} - {_clientProxy = If( json?.PropertyT("clientProxy"), out var __jsonClientProxy) ? (bool)__jsonClientProxy : ClientProxy;} + {_authenticationMethod = If( json?.PropertyT("authenticationMethod"), out var __jsonAuthenticationMethod) ? (string)__jsonAuthenticationMethod : (string)_authenticationMethod;} + {_clientProxy = If( json?.PropertyT("clientProxy"), out var __jsonClientProxy) ? (bool)__jsonClientProxy : _clientProxy;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.PowerShell.cs similarity index 74% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.PowerShell.cs index 04489913dd2d..8d20d6efd444 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class OidcIssuerProfile 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.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OidcIssuerProfile(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.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OidcIssuerProfile(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal OidcIssuerProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IssuerUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).IssuerUrl = (string) content.GetValueForProperty("IssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).IssuerUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).IssuerUrl = (string) content.GetValueForProperty("IssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).IssuerUrl, global::System.Convert.ToString); } if (content.Contains("SelfHostedIssuerUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl = (string) content.GetValueForProperty("SelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl = (string) content.GetValueForProperty("SelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal OidcIssuerProfile(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IssuerUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).IssuerUrl = (string) content.GetValueForProperty("IssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).IssuerUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).IssuerUrl = (string) content.GetValueForProperty("IssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).IssuerUrl, global::System.Convert.ToString); } if (content.Contains("SelfHostedIssuerUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl = (string) content.GetValueForProperty("SelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl = (string) content.GetValueForProperty("SelfHostedIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal)this).SelfHostedIssuerUrl, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.TypeConverter.cs index 194d58fd2b34..3866c40bd910 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.cs similarity index 92% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.cs index 98345b75abbe..89fb255f8517 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// OIDC Issuer Profile specifies attributes for workload identity integration. public partial class OidcIssuerProfile : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal { /// Backing field for property. @@ -30,7 +30,7 @@ public partial class OidcIssuerProfile : public string IssuerUrl { get => this._issuerUrl; } /// Internal Acessors for IssuerUrl - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfileInternal.IssuerUrl { get => this._issuerUrl; set { {_issuerUrl = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfileInternal.IssuerUrl { get => this._issuerUrl; set { {_issuerUrl = value;} } } /// Backing field for property. private string _selfHostedIssuerUrl; @@ -55,6 +55,9 @@ public partial interface IOidcIssuerProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable oidc issuer for workload identity integration.", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -65,6 +68,9 @@ public partial interface IOidcIssuerProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The issuer url for hybrid clusters connected to Arc used for the workload identity feature.", SerializedName = @"issuerUrl", PossibleTypes = new [] { typeof(string) })] @@ -75,6 +81,9 @@ public partial interface IOidcIssuerProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature.", SerializedName = @"selfHostedIssuerUrl", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.json.cs index c811099e721e..30ac38dfa65c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OidcIssuerProfile.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OidcIssuerProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OidcIssuerProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOidcIssuerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOidcIssuerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new OidcIssuerProfile(json) : null; } @@ -77,9 +77,9 @@ internal OidcIssuerProfile(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernete { return; } - {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled;} - {_issuerUrl = If( json?.PropertyT("issuerUrl"), out var __jsonIssuerUrl) ? (string)__jsonIssuerUrl : (string)IssuerUrl;} - {_selfHostedIssuerUrl = If( json?.PropertyT("selfHostedIssuerUrl"), out var __jsonSelfHostedIssuerUrl) ? (string)__jsonSelfHostedIssuerUrl : (string)SelfHostedIssuerUrl;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + {_issuerUrl = If( json?.PropertyT("issuerUrl"), out var __jsonIssuerUrl) ? (string)__jsonIssuerUrl : (string)_issuerUrl;} + {_selfHostedIssuerUrl = If( json?.PropertyT("selfHostedIssuerUrl"), out var __jsonSelfHostedIssuerUrl) ? (string)__jsonSelfHostedIssuerUrl : (string)_selfHostedIssuerUrl;} AfterFromJson(json); } @@ -103,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN return container; } AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._issuerUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._issuerUrl.ToString()) : null, "issuerUrl" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.PowerShell.cs similarity index 66% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.PowerShell.cs index b69f4a379102..ffe252a44cdd 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class Operation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Operation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Operation(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +111,33 @@ internal Operation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -154,27 +152,27 @@ internal Operation(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.TypeConverter.cs index 777c3606db34..c2a9064a885d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.cs similarity index 63% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.cs index 37010081eae1..e99cd14c4e2f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.cs @@ -3,44 +3,56 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The Connected cluster API operation public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay _display; /// The object that represents the operation. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay()); } /// Description of the operation. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Description = value ?? null; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Description; } /// Operation type: Read, write, delete, etc. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Operation = value ?? null; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Operation; } /// Service provider: Microsoft.Kubernetes [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Provider = value ?? null; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Provider; } /// Connected Cluster Resource on which the operation is performed [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)Display).Resource = value ?? null; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Resource; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Description = value; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Operation = value; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Provider = value; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)Display).Resource = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } /// Backing field for property. private string _name; @@ -62,39 +74,54 @@ public partial interface IOperation : /// Description of the operation. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Description of the operation.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - string DisplayDescription { get; set; } + string DisplayDescription { get; } /// Operation type: Read, write, delete, etc. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Operation type: Read, write, delete, etc.", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] - string DisplayOperation { get; set; } + string DisplayOperation { get; } /// Service provider: Microsoft.Kubernetes [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Service provider: Microsoft.Kubernetes", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] - string DisplayProvider { get; set; } + string DisplayProvider { get; } /// Connected Cluster Resource on which the operation is performed [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Connected Cluster Resource on which the operation is performed", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] - string DisplayResource { get; set; } + string DisplayResource { get; } /// Operation name: {Microsoft.Kubernetes}/{resource}/{operation} [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Operation name: {Microsoft.Kubernetes}/{resource}/{operation}", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -106,7 +133,7 @@ internal partial interface IOperationInternal { /// The object that represents the operation. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay Display { get; set; } /// Description of the operation. string DisplayDescription { get; set; } /// Operation type: Read, write, delete, etc. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.json.cs index 6e9dca9a0c0c..ba0a182f035f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/Operation.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Operation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Operation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new Operation(json) : null; } @@ -77,8 +77,8 @@ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtim { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} AfterFromJson(json); } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs similarity index 72% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs index 3058f74f65e6..e6948c468915 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class OperationDisplay partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationDisplay(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationDisplay(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +111,25 @@ internal OperationDisplay(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +144,19 @@ internal OperationDisplay(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs index f0fd29bbc039..4778bc6d532c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.cs index cb39a400246a..762d2d33b1c9 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The object that represents the operation. public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplayInternal { /// Backing field for property. @@ -55,6 +55,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the operation.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -63,6 +66,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Operation type: Read, write, delete, etc.", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -71,6 +77,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Service provider: Microsoft.Kubernetes", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -79,6 +88,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Connected Cluster Resource on which the operation is performed", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.json.cs index afa3e0960fee..054c4d3c4727 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationDisplay.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; } @@ -77,10 +77,10 @@ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes { return; } - {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} - {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.PowerShell.cs similarity index 75% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.PowerShell.cs index 15d680725dc4..fb944e1650a3 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class OperationList 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.ConnectedKubernetes.Models.Api20240715Preview.IOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationList(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.ConnectedKubernetes.Models.Api20240715Preview.IOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationList(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal OperationList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal OperationList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.TypeConverter.cs index d1e5f55376ea..e966ced0933a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.cs similarity index 74% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.cs index 90bfb2db3120..721f4f358c73 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The paginated list of connected cluster API operations. public partial class OperationList : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal { /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationListInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -24,11 +24,11 @@ public partial class OperationList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[] _value; + private System.Collections.Generic.List _value; /// The list of connected cluster API operations. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public OperationList() @@ -44,6 +44,9 @@ public partial interface IOperationList : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The link to fetch the next page of connected cluster API operations.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -52,10 +55,13 @@ public partial interface IOperationList : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The list of connected cluster API operations.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation) })] + System.Collections.Generic.List Value { get; } } /// The paginated list of connected cluster API operations. @@ -65,7 +71,7 @@ internal partial interface IOperationListInternal /// The link to fetch the next page of connected cluster API operations. string NextLink { get; set; } /// The list of connected cluster API operations. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.json.cs similarity index 91% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.json.cs index 3634486305fa..614d5119de80 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/OperationList.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/OperationList.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new OperationList(json) : null; } @@ -77,8 +77,8 @@ internal OperationList(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Ru { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.Operation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.PowerShell.cs similarity index 79% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.PowerShell.cs index c828c574fc5f..e6268fd7df05 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class Resource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Resource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +142,15 @@ internal Resource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.TypeConverter.cs similarity index 98% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.TypeConverter.cs index a9d8d58b54f2..092f62c5266e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.cs similarity index 91% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.cs index bc5179521a26..fdac46b46817 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 /// Common fields that are returned in the response for all Azure Resource Manager resources /// public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal { /// Backing field for property. @@ -25,13 +25,13 @@ public partial class Resource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -65,6 +65,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -73,6 +76,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -83,6 +89,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.json.cs similarity index 95% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.json.cs index b3d8cbdb7fdb..bfb876c12989 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/Resource.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Resource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -79,9 +79,9 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -104,15 +104,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.PowerShell.cs similarity index 74% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.PowerShell.cs index a19bfe4f9b8c..3c04391960b6 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SecurityProfile 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.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SecurityProfile(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.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SecurityProfile(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SecurityProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("WorkloadIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("WorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("WorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); } if (content.Contains("WorkloadIdentityEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SecurityProfile(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("WorkloadIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("WorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity) content.GetValueForProperty("WorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); } if (content.Contains("WorkloadIdentityEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.TypeConverter.cs index 94c3c88f1b99..947e23b7ab5f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.cs similarity index 68% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.cs index fac3b8528ede..e558e4fd6869 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.cs @@ -3,29 +3,29 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Security Profile specifies attributes for cluster security features. public partial class SecurityProfile : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal { /// Internal Acessors for WorkloadIdentity - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileInternal.WorkloadIdentity { get => (this._workloadIdentity = this._workloadIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity()); set { {_workloadIdentity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileInternal.WorkloadIdentity { get => (this._workloadIdentity = this._workloadIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity()); set { {_workloadIdentity = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity _workloadIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity _workloadIdentity; /// The workload identity feature webhook. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity WorkloadIdentity { get => (this._workloadIdentity = this._workloadIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity()); set => this._workloadIdentity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity WorkloadIdentity { get => (this._workloadIdentity = this._workloadIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity()); set => this._workloadIdentity = value; } /// Whether to enable or disable the workload identity Webhook [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)] - public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal)WorkloadIdentity).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal)WorkloadIdentity).Enabled = value ?? default(bool); } + public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal)WorkloadIdentity).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal)WorkloadIdentity).Enabled = value ?? default(bool); } /// Creates an new instance. public SecurityProfile() @@ -41,6 +41,9 @@ public partial interface ISecurityProfile : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable or disable the workload identity Webhook", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -52,7 +55,7 @@ internal partial interface ISecurityProfileInternal { /// The workload identity feature webhook. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity WorkloadIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity WorkloadIdentity { get; set; } /// Whether to enable or disable the workload identity Webhook bool? WorkloadIdentityEnabled { get; set; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.json.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.json.cs index c499c7364ab7..146d8544c8ca 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfile.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfile.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SecurityProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new SecurityProfile(json) : null; } @@ -77,7 +77,7 @@ internal SecurityProfile(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes. { return; } - {_workloadIdentity = If( json?.PropertyT("workloadIdentity"), out var __jsonWorkloadIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.SecurityProfileWorkloadIdentity.FromJson(__jsonWorkloadIdentity) : WorkloadIdentity;} + {_workloadIdentity = If( json?.PropertyT("workloadIdentity"), out var __jsonWorkloadIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.SecurityProfileWorkloadIdentity.FromJson(__jsonWorkloadIdentity) : _workloadIdentity;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.PowerShell.cs similarity index 81% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.PowerShell.cs index f29e93cc5641..bf5ec3dabee1 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SecurityProfileWorkloadIdentity 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.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SecurityProfileWorkloadIdentity(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.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SecurityProfileWorkloadIdentity(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +113,13 @@ internal SecurityProfileWorkloadIdentity(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +134,7 @@ internal SecurityProfileWorkloadIdentity(global::System.Management.Automation.PS // actually deserialize if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.TypeConverter.cs index 19f3c8abec96..c5f5f949d5fc 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.cs index a6767ea21b31..01ddd9b110e0 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// The workload identity feature webhook. public partial class SecurityProfileWorkloadIdentity : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentityInternal { /// Backing field for property. @@ -34,6 +34,9 @@ public partial interface ISecurityProfileWorkloadIdentity : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether to enable or disable the workload identity Webhook", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.json.cs index e4774244a9fd..0d50a76aad00 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SecurityProfileWorkloadIdentity.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SecurityProfileWorkloadIdentity.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SecurityProfileWorkloadIdentity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISecurityProfileWorkloadIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISecurityProfileWorkloadIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new SecurityProfileWorkloadIdentity(json) : null; } @@ -77,7 +77,7 @@ internal SecurityProfileWorkloadIdentity(Microsoft.Azure.PowerShell.Cmdlets.Conn { return; } - {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.PowerShell.cs similarity index 72% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.PowerShell.cs index 3ebfbaa1cf0c..91267fd83f48 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SystemComponent 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.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SystemComponent(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.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemComponent(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +111,25 @@ internal SystemComponent(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserSpecifiedVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).UserSpecifiedVersion = (string) content.GetValueForProperty("UserSpecifiedVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).UserSpecifiedVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).UserSpecifiedVersion = (string) content.GetValueForProperty("UserSpecifiedVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).UserSpecifiedVersion, global::System.Convert.ToString); } if (content.Contains("MajorVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).MajorVersion = (int?) content.GetValueForProperty("MajorVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).MajorVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).MajorVersion = (int?) content.GetValueForProperty("MajorVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).MajorVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("CurrentVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).CurrentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).CurrentVersion, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +144,19 @@ internal SystemComponent(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserSpecifiedVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).UserSpecifiedVersion = (string) content.GetValueForProperty("UserSpecifiedVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).UserSpecifiedVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).UserSpecifiedVersion = (string) content.GetValueForProperty("UserSpecifiedVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).UserSpecifiedVersion, global::System.Convert.ToString); } if (content.Contains("MajorVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).MajorVersion = (int?) content.GetValueForProperty("MajorVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).MajorVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).MajorVersion = (int?) content.GetValueForProperty("MajorVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).MajorVersion, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("CurrentVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal)this).CurrentVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal)this).CurrentVersion, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.TypeConverter.cs index c72168b0db78..addb581dff30 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.cs similarity index 92% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.cs index 72a24fcf742a..2cc60d0d568c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// System extensions and its current versions installed on the cluster resource. public partial class SystemComponent : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal { /// Backing field for property. @@ -32,7 +32,7 @@ public partial class SystemComponent : public int? MajorVersion { get => this._majorVersion; set => this._majorVersion = value; } /// Internal Acessors for CurrentVersion - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponentInternal.CurrentVersion { get => this._currentVersion; set { {_currentVersion = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponentInternal.CurrentVersion { get => this._currentVersion; set { {_currentVersion = value;} } } /// Backing field for property. private string _type; @@ -64,6 +64,9 @@ public partial interface ISystemComponent : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Version of the system extension that is currently installed on the cluster resource.", SerializedName = @"currentVersion", PossibleTypes = new [] { typeof(string) })] @@ -74,6 +77,9 @@ public partial interface ISystemComponent : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Major Version of the system extension that is currently installed on the cluster resource.", SerializedName = @"majorVersion", PossibleTypes = new [] { typeof(int) })] @@ -82,6 +88,9 @@ public partial interface ISystemComponent : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the system extension", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -90,6 +99,9 @@ public partial interface ISystemComponent : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the system extension to be installed on the cluster resource.", SerializedName = @"userSpecifiedVersion", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.json.cs index b21da9d6b7fe..d8befb880146 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemComponent.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemComponent.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.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SystemComponent partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new SystemComponent(json) : null; } @@ -77,10 +77,10 @@ internal SystemComponent(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes. { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_userSpecifiedVersion = If( json?.PropertyT("userSpecifiedVersion"), out var __jsonUserSpecifiedVersion) ? (string)__jsonUserSpecifiedVersion : (string)UserSpecifiedVersion;} - {_majorVersion = If( json?.PropertyT("majorVersion"), out var __jsonMajorVersion) ? (int?)__jsonMajorVersion : MajorVersion;} - {_currentVersion = If( json?.PropertyT("currentVersion"), out var __jsonCurrentVersion) ? (string)__jsonCurrentVersion : (string)CurrentVersion;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_userSpecifiedVersion = If( json?.PropertyT("userSpecifiedVersion"), out var __jsonUserSpecifiedVersion) ? (string)__jsonUserSpecifiedVersion : (string)_userSpecifiedVersion;} + {_majorVersion = If( json?.PropertyT("majorVersion"), out var __jsonMajorVersion) ? (int?)__jsonMajorVersion : _majorVersion;} + {_currentVersion = If( json?.PropertyT("currentVersion"), out var __jsonCurrentVersion) ? (string)__jsonCurrentVersion : (string)_currentVersion;} AfterFromJson(json); } @@ -106,7 +106,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); AddIf( null != (((object)this._userSpecifiedVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._userSpecifiedVersion.ToString()) : null, "userSpecifiedVersion" ,container.Add ); AddIf( null != this._majorVersion ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNumber((int)this._majorVersion) : null, "majorVersion" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._currentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._currentVersion.ToString()) : null, "currentVersion" ,container.Add ); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.PowerShell.cs similarity index 62% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.PowerShell.cs index 50933b774837..e48ae271f9fc 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SystemData partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SystemData(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemData(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +111,33 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.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.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -154,27 +152,27 @@ internal SystemData(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.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.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.TypeConverter.cs index 99dcf585df82..6e805a1b7532 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.cs similarity index 80% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.cs index aba17f9dc4da..9e083c42b9ef 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Metadata pertaining to creation and last modification of the resource. public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemDataInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemDataInternal { /// Backing field for property. @@ -28,11 +28,11 @@ public partial class SystemData : public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? _createdByType; + private string _createdByType; /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } /// Backing field for property. private global::System.DateTime? _lastModifiedAt; @@ -49,11 +49,11 @@ public partial class SystemData : public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType? _lastModifiedByType; + private string _lastModifiedByType; /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } /// Creates an new instance. public SystemData() @@ -69,6 +69,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -77,6 +80,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] @@ -85,14 +91,21 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? CreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource modification (UTC). [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource modification (UTC).", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -101,6 +114,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] @@ -109,10 +125,14 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType? LastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } /// Metadata pertaining to creation and last modification of the resource. @@ -124,13 +144,15 @@ internal partial interface ISystemDataInternal /// The identity that created the resource. string CreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType? CreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource modification (UTC). global::System.DateTime? LastModifiedAt { get; set; } /// The identity that last modified the resource. string LastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType? LastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.json.cs similarity index 94% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.json.cs index 285f9032d177..7be4843fab2d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20240715Preview/SystemData.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/SystemData.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new SystemData(json) : null; } @@ -77,12 +77,12 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runti { return; } - {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} - {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} - {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} - {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} AfterFromJson(json); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.PowerShell.cs similarity index 72% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.PowerShell.cs index 73fef7f6b045..4ef7fc6b1d88 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class TrackedResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResource(content); } @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +115,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,29 +130,29 @@ internal TrackedResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -167,23 +167,23 @@ internal TrackedResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs index 0989f3a82ab7..2eff7c67bb3c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.cs similarity index 76% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.cs index d95cdf6d4f5e..91bad8b9418f 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -11,21 +11,21 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' /// public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Resource(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Id; } /// Backing field for property. private string _location; @@ -35,30 +35,30 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags()); set => this._tag = value; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal)__resource).Type; } /// Creates an new instance. public TrackedResource() @@ -81,12 +81,15 @@ public TrackedResource() /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' public partial interface ITrackedResource : Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResource + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResource { /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -95,20 +98,23 @@ public partial interface ITrackedResource : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags Tag { get; set; } } /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IResourceInternal { /// The geo-location where the resource lives string Location { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.json.cs similarity index 88% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.json.cs index 502f5d0c1aec..f6a2f64b31ad 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResource.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class TrackedResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; } @@ -88,7 +88,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonN } __resource?.ToJson(container, serializationMode); AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } AfterToJson(ref container); return container; } @@ -105,9 +108,9 @@ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes. { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.Resource(json); - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.TrackedResourceTags.FromJson(__jsonTags) : Tag;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs similarity index 89% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs index b56a17b68968..2c08c3efbb5e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class TrackedResourceTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResourceTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResourceTags(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api2 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -132,7 +132,7 @@ internal TrackedResourceTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs similarity index 97% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs index 7002efeb694d..2277ea2655f4 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.cs similarity index 93% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.cs index a8c3911a7e5e..9f397f64b898 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; /// Resource tags. public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTagsInternal { /// Creates an new instance. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs index 8d14d35d35bd..edd7fe786264 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.dictionary.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api20.TrackedResourceTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.TrackedResourceTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.json.cs similarity index 96% rename from generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs rename to generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.json.cs index d2547ec6bfe3..aaa5f96fe9b0 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResourceTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.Completer.cs deleted file mode 100644 index 2fdc93f01964..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The mode of client authentication. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethodTypeConverter))] - public partial struct AuthenticationMethod : - 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) || "Token".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Token'", "Token", global::System.Management.Automation.CompletionResultType.ParameterValue, "Token"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AAD".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AAD'", "AAD", global::System.Management.Automation.CompletionResultType.ParameterValue, "AAD"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.TypeConverter.cs deleted file mode 100644 index 9e634a2f2501..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The mode of client authentication. - public partial class AuthenticationMethodTypeConverter : - 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) => AuthenticationMethod.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.cs deleted file mode 100644 index 637b16ddcd0e..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AuthenticationMethod.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The mode of client authentication. - public partial struct AuthenticationMethod : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod Aad = @"AAD"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod Token = @"Token"; - - /// 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 AuthenticationMethod(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AuthenticationMethod - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AuthenticationMethod(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AuthenticationMethod - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AuthenticationMethod (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 AuthenticationMethod && Equals((AuthenticationMethod)obj); - } - - /// Returns hashCode for enum AuthenticationMethod - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AuthenticationMethod - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AuthenticationMethod - /// the value to convert to an instance of . - - public static implicit operator AuthenticationMethod(string value) - { - return new AuthenticationMethod(value); - } - - /// Implicit operator to convert AuthenticationMethod to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod e) - { - return e._value; - } - - /// Overriding != operator for enum AuthenticationMethod - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AuthenticationMethod - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.Completer.cs deleted file mode 100644 index a22da4402e68..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.Completer.cs +++ /dev/null @@ -1,41 +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.ConnectedKubernetes.Support -{ - - /// - /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptionsTypeConverter))] - public partial struct AutoUpgradeOptions : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.TypeConverter.cs deleted file mode 100644 index efa4abc63237..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// - /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. - /// - public partial class AutoUpgradeOptionsTypeConverter : - 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) => AutoUpgradeOptions.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.cs deleted file mode 100644 index e0478f661491..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AutoUpgradeOptions.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// - /// Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled. - /// - public partial struct AutoUpgradeOptions : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions Enabled = @"Enabled"; - - /// 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 AutoUpgradeOptions(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AutoUpgradeOptions - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AutoUpgradeOptions(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AutoUpgradeOptions - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AutoUpgradeOptions (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 AutoUpgradeOptions && Equals((AutoUpgradeOptions)obj); - } - - /// Returns hashCode for enum AutoUpgradeOptions - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AutoUpgradeOptions - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AutoUpgradeOptions - /// the value to convert to an instance of . - - public static implicit operator AutoUpgradeOptions(string value) - { - return new AutoUpgradeOptions(value); - } - - /// Implicit operator to convert AutoUpgradeOptions to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions e) - { - return e._value; - } - - /// Overriding != operator for enum AutoUpgradeOptions - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AutoUpgradeOptions - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.Completer.cs deleted file mode 100644 index 5587662b1a7a..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Indicates whether Azure Hybrid Benefit is opted in - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefitTypeConverter))] - public partial struct AzureHybridBenefit : - 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) || "True".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'True'", "True", global::System.Management.Automation.CompletionResultType.ParameterValue, "True"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "False".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'False'", "False", global::System.Management.Automation.CompletionResultType.ParameterValue, "False"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotApplicable".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NotApplicable'", "NotApplicable", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotApplicable"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.TypeConverter.cs deleted file mode 100644 index cbbdf655ce70..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Indicates whether Azure Hybrid Benefit is opted in - public partial class AzureHybridBenefitTypeConverter : - 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) => AzureHybridBenefit.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.cs deleted file mode 100644 index 0b692722a4a8..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/AzureHybridBenefit.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Indicates whether Azure Hybrid Benefit is opted in - public partial struct AzureHybridBenefit : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit False = @"False"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit NotApplicable = @"NotApplicable"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit True = @"True"; - - /// 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 AzureHybridBenefit(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AzureHybridBenefit - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AzureHybridBenefit(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AzureHybridBenefit - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AzureHybridBenefit (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 AzureHybridBenefit && Equals((AzureHybridBenefit)obj); - } - - /// Returns hashCode for enum AzureHybridBenefit - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AzureHybridBenefit - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AzureHybridBenefit - /// the value to convert to an instance of . - - public static implicit operator AzureHybridBenefit(string value) - { - return new AzureHybridBenefit(value); - } - - /// Implicit operator to convert AzureHybridBenefit to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit e) - { - return e._value; - } - - /// Overriding != operator for enum AzureHybridBenefit - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AzureHybridBenefit - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.Completer.cs deleted file mode 100644 index 5f1ae4a541f6..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.Completer.cs +++ /dev/null @@ -1,35 +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.ConnectedKubernetes.Support -{ - - /// Indicates the kind of Arc connected cluster based on host infrastructure. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKindTypeConverter))] - public partial struct ConnectedClusterKind : - 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) || "ProvisionedCluster".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ProvisionedCluster'", "ProvisionedCluster", global::System.Management.Automation.CompletionResultType.ParameterValue, "ProvisionedCluster"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.TypeConverter.cs deleted file mode 100644 index 2055e079b1d9..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Indicates the kind of Arc connected cluster based on host infrastructure. - public partial class ConnectedClusterKindTypeConverter : - 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) => ConnectedClusterKind.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.cs deleted file mode 100644 index c6f80f82b611..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectedClusterKind.cs +++ /dev/null @@ -1,96 +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.ConnectedKubernetes.Support -{ - - /// Indicates the kind of Arc connected cluster based on host infrastructure. - public partial struct ConnectedClusterKind : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind ProvisionedCluster = @"ProvisionedCluster"; - - /// 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 ConnectedClusterKind(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ConnectedClusterKind - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ConnectedClusterKind(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ConnectedClusterKind - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ConnectedClusterKind (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 ConnectedClusterKind && Equals((ConnectedClusterKind)obj); - } - - /// Returns hashCode for enum ConnectedClusterKind - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ConnectedClusterKind - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ConnectedClusterKind - /// the value to convert to an instance of . - - public static implicit operator ConnectedClusterKind(string value) - { - return new ConnectedClusterKind(value); - } - - /// Implicit operator to convert ConnectedClusterKind to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind e) - { - return e._value; - } - - /// Overriding != operator for enum ConnectedClusterKind - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ConnectedClusterKind - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.Completer.cs deleted file mode 100644 index 2746b939199e..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Represents the connectivity status of the connected cluster. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatusTypeConverter))] - public partial struct ConnectivityStatus : - 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) || "Connecting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Connecting'", "Connecting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Connecting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Connected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Connected'", "Connected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Connected"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Offline".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Offline'", "Offline", global::System.Management.Automation.CompletionResultType.ParameterValue, "Offline"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Expired".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Expired'", "Expired", global::System.Management.Automation.CompletionResultType.ParameterValue, "Expired"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.TypeConverter.cs deleted file mode 100644 index e7ff3209cde3..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Represents the connectivity status of the connected cluster. - public partial class ConnectivityStatusTypeConverter : - 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) => ConnectivityStatus.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.cs deleted file mode 100644 index f5ea7eadb2c6..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ConnectivityStatus.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// Represents the connectivity status of the connected cluster. - public partial struct ConnectivityStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus Connected = @"Connected"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus Connecting = @"Connecting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus Expired = @"Expired"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus Offline = @"Offline"; - - /// 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 ConnectivityStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ConnectivityStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ConnectivityStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ConnectivityStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ConnectivityStatus (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 ConnectivityStatus && Equals((ConnectivityStatus)obj); - } - - /// Returns hashCode for enum ConnectivityStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ConnectivityStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ConnectivityStatus - /// the value to convert to an instance of . - - public static implicit operator ConnectivityStatus(string value) - { - return new ConnectivityStatus(value); - } - - /// Implicit operator to convert ConnectivityStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus e) - { - return e._value; - } - - /// Overriding != operator for enum ConnectivityStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ConnectivityStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectivityStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index f002feb27f30..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByTypeTypeConverter))] - public partial struct CreatedByType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index 798f9597b83b..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The type of identity that created the resource. - public partial class CreatedByTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CreatedByType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index 11198abc8a35..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/CreatedByType.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to CreatedByType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CreatedByType(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CreatedByType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type CreatedByType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CreatedByType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CreatedByType && Equals((CreatedByType)obj); - } - - /// Returns hashCode for enum CreatedByType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CreatedByType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CreatedByType - /// the value to convert to an instance of . - - public static implicit operator CreatedByType(string value) - { - return new CreatedByType(value); - } - - /// Implicit operator to convert CreatedByType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType e) - { - return e._value; - } - - /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.Completer.cs deleted file mode 100644 index caae2eea9897..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The type of identity that last modified the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByTypeTypeConverter))] - public partial struct LastModifiedByType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.TypeConverter.cs deleted file mode 100644 index 19377d4eee64..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The type of identity that last modified the resource. - public partial class LastModifiedByTypeTypeConverter : - 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) => LastModifiedByType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.cs deleted file mode 100644 index 94be2ddbd2ba..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/LastModifiedByType.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The type of identity that last modified the resource. - public partial struct LastModifiedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to LastModifiedByType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new LastModifiedByType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type LastModifiedByType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type LastModifiedByType (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 LastModifiedByType && Equals((LastModifiedByType)obj); - } - - /// Returns hashCode for enum LastModifiedByType - /// 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 LastModifiedByType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for LastModifiedByType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to LastModifiedByType - /// the value to convert to an instance of . - - public static implicit operator LastModifiedByType(string value) - { - return new LastModifiedByType(value); - } - - /// Implicit operator to convert LastModifiedByType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType e) - { - return e._value; - } - - /// Overriding != operator for enum LastModifiedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum LastModifiedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.LastModifiedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.Completer.cs deleted file mode 100644 index 10a252f71f8b..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.Completer.cs +++ /dev/null @@ -1,41 +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.ConnectedKubernetes.Support -{ - - /// - /// Property which describes the state of private link on a connected cluster resource. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkStateTypeConverter))] - public partial struct PrivateLinkState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.TypeConverter.cs deleted file mode 100644 index 02b7deb6b919..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// - /// Property which describes the state of private link on a connected cluster resource. - /// - public partial class PrivateLinkStateTypeConverter : - 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) => PrivateLinkState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.cs deleted file mode 100644 index 905542519b77..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/PrivateLinkState.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// - /// Property which describes the state of private link on a connected cluster resource. - /// - public partial struct PrivateLinkState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState Enabled = @"Enabled"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PrivateLinkState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PrivateLinkState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PrivateLinkState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PrivateLinkState (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 PrivateLinkState && Equals((PrivateLinkState)obj); - } - - /// Returns hashCode for enum PrivateLinkState - /// 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 PrivateLinkState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PrivateLinkState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PrivateLinkState - /// the value to convert to an instance of . - - public static implicit operator PrivateLinkState(string value) - { - return new PrivateLinkState(value); - } - - /// Implicit operator to convert PrivateLinkState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState e) - { - return e._value; - } - - /// Overriding != operator for enum PrivateLinkState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PrivateLinkState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.Completer.cs deleted file mode 100644 index f05639c6bcb8..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.Completer.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The current deployment state of connectedClusters. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningStateTypeConverter))] - public partial struct ProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Accepted'", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs deleted file mode 100644 index 3598dc3fb313..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// The current deployment state of connectedClusters. - public partial class ProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.cs deleted file mode 100644 index e79f0890055c..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ProvisioningState.cs +++ /dev/null @@ -1,108 +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.ConnectedKubernetes.Support -{ - - /// The current deployment state of connectedClusters. - public partial struct ProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Accepted = @"Accepted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Provisioning = @"Provisioning"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Succeeded = @"Succeeded"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Updating = @"Updating"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ProvisioningState && Equals((ProvisioningState)obj); - } - - /// Returns hashCode for enum ProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningState - /// the value to convert to an instance of . - - public static implicit operator ProvisioningState(string value) - { - return new ProvisioningState(value); - } - - /// Implicit operator to convert ProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs deleted file mode 100644 index 35d4cad1ecf7..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs +++ /dev/null @@ -1,42 +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.ConnectedKubernetes.Support -{ - - /// - /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The - /// type 'None' means no identity is assigned to the connected cluster. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityTypeTypeConverter))] - public partial struct ResourceIdentityType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); - } - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs deleted file mode 100644 index 4d14e3cc427c..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support -{ - - /// - /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The - /// type 'None' means no identity is assigned to the connected cluster. - /// - public partial class ResourceIdentityTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ResourceIdentityType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.cs deleted file mode 100644 index c2c3568ad9f7..000000000000 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/api/Support/ResourceIdentityType.cs +++ /dev/null @@ -1,101 +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.ConnectedKubernetes.Support -{ - - /// - /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The - /// type 'None' means no identity is assigned to the connected cluster. - /// - public partial struct ResourceIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType SystemAssigned = @"SystemAssigned"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ResourceIdentityType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ResourceIdentityType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ResourceIdentityType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ResourceIdentityType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ResourceIdentityType && Equals((ResourceIdentityType)obj); - } - - /// Returns hashCode for enum ResourceIdentityType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ResourceIdentityType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ResourceIdentityType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ResourceIdentityType - /// the value to convert to an instance of . - - public static implicit operator ResourceIdentityType(string value) - { - return new ResourceIdentityType(value); - } - - /// Implicit operator to convert ResourceIdentityType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e) - { - return e._value; - } - - /// Overriding != operator for enum ResourceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ResourceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs index b4e5e3a851f5..8a07cce860c5 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesOperation_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// Lists all of the available API operations for Connected Cluster resource. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetesOperation_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Lists all of the available API operations for Connected Cluster resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/providers/Microsoft.Kubernetes/operations", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetesOperation_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzConnectedKubernetesOperation_Get : global::System.Mana /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzConnectedKubernetesOperation_Get : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class GetAzConnectedKubernetesOperation_Get : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -108,24 +129,24 @@ public partial class GetAzConnectedKubernetesOperation_Get : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -148,6 +169,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -169,7 +195,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetesOperation_Get() { @@ -220,8 +246,33 @@ public GetAzConnectedKubernetesOperation_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -274,7 +325,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -292,7 +343,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -330,12 +381,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -352,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -370,12 +421,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperationList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +438,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperationList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs index 2af54b0f20df..7a6899b585fb 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [OpenAPI] ListClusterUserCredential=>POST:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetesUserCredential_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Gets cluster user credentials of the connected cluster with a specified resource group and name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetesUserCredential_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzConnectedKubernetesUserCredential_List : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -69,6 +87,9 @@ public partial class GetAzConnectedKubernetesUserCredential_List : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -95,10 +116,10 @@ public partial class GetAzConnectedKubernetesUserCredential_List : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties _property; [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".", ValueFromPipeline = true)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( @@ -106,8 +127,9 @@ public partial class GetAzConnectedKubernetesUserCredential_List : global::Syste ReadOnly = false, Description = @"", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties Property { get => this._property; set => this._property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties Property { get => this._property; set => this._property = value; } /// 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")] @@ -153,7 +175,8 @@ public partial class GetAzConnectedKubernetesUserCredential_List : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -162,24 +185,24 @@ public partial class GetAzConnectedKubernetesUserCredential_List : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults /// 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) @@ -202,6 +225,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -223,7 +251,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetesUserCredential_List() { @@ -274,8 +302,33 @@ public GetAzConnectedKubernetesUserCredential_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,7 +405,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName,body=Property}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +465,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=Property }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=Property }) + 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 } }); @@ -430,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults /// 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 ) { @@ -447,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs index d1e6979129b7..ad28de125d0d 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [OpenAPI] ListClusterUserCredential=>POST:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetesUserCredential_ListExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Gets cluster user credentials of the connected cluster with a specified resource group and name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,7 +39,19 @@ public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : globa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IListClusterUserCredentialProperties _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ListClusterUserCredentialProperties(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IListClusterUserCredentialProperties _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ListClusterUserCredentialProperties(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// The mode of client authentication. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The mode of client authentication.")] @@ -46,15 +61,18 @@ public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : globa ReadOnly = false, Description = @"The mode of client authentication.", SerializedName = @"authenticationMethod", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AuthenticationMethod AuthenticationMethod { get => _propertiesBody.AuthenticationMethod; set => _propertiesBody.AuthenticationMethod = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Token", "AAD")] + public string AuthenticationMethod { get => _propertiesBody.AuthenticationMethod ?? null; set => _propertiesBody.AuthenticationMethod = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -94,6 +112,9 @@ public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : globa [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -120,7 +141,7 @@ public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -166,7 +187,8 @@ public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : globa [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -175,24 +197,24 @@ public partial class GetAzConnectedKubernetesUserCredential_ListExpanded : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults /// 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) @@ -215,6 +237,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -236,7 +263,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetesUserCredential_ListExpanded() { @@ -287,8 +314,33 @@ public GetAzConnectedKubernetesUserCredential_ListExpanded() 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.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -344,7 +396,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -365,7 +417,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName,body=_propertiesBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -403,12 +455,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,15 +477,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_propertiesBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_propertiesBody }) + 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 } }); @@ -443,12 +495,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults /// 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 ) { @@ -460,8 +512,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ICredentialResults - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonFilePath.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonFilePath.cs new file mode 100644 index 000000000000..ec7ab67f3587 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonFilePath.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; + using System; + + /// + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. + /// + /// + /// [OpenAPI] ListClusterUserCredential=>POST:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetesUserCredential_ListViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Gets cluster user credentials of the connected cluster with a specified resource group and name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential", ApiVersion = "2024-07-15-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.NotSuggestDefaultParameterSet] + public partial class GetAzConnectedKubernetesUserCredential_ListViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the Kubernetes cluster on which get is called. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Kubernetes cluster on which get is called.")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Kubernetes cluster on which get is called.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the List operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the List operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the List operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults + /// 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.ConnectedKubernetes.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzConnectedKubernetesUserCredential_ListViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConnectedClusterListClusterUserCredential' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ConnectedClusterListClusterUserCredentialViaJsonString(SubscriptionId, ResourceGroupName, ClusterName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.ICredentialResults + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonString.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonString.cs new file mode 100644 index 000000000000..98dda17876f1 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetesUserCredential_ListViaJsonString.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; + using System; + + /// + /// Gets cluster user credentials of the connected cluster with a specified resource group and name. + /// + /// + /// [OpenAPI] ListClusterUserCredential=>POST:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetesUserCredential_ListViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Gets cluster user credentials of the connected cluster with a specified resource group and name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential", ApiVersion = "2024-07-15-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.NotSuggestDefaultParameterSet] + public partial class GetAzConnectedKubernetesUserCredential_ListViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the Kubernetes cluster on which get is called. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Kubernetes cluster on which get is called.")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Kubernetes cluster on which get is called.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the List operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the List operation")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the List operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults + /// 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.ConnectedKubernetes.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzConnectedKubernetesUserCredential_ListViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConnectedClusterListClusterUserCredential' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ConnectedClusterListClusterUserCredentialViaJsonString(SubscriptionId, ResourceGroupName, ClusterName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.ICredentialResults + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ICredentialResults + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs index 9a30b42075e1..ca6709357851 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetes_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetes_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class GetAzConnectedKubernetes_Get : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -70,6 +88,9 @@ public partial class GetAzConnectedKubernetes_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -96,7 +117,7 @@ public partial class GetAzConnectedKubernetes_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -142,7 +163,8 @@ public partial class GetAzConnectedKubernetes_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -151,24 +173,24 @@ public partial class GetAzConnectedKubernetes_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 Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -191,6 +213,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -212,7 +239,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetes_Get() { @@ -263,8 +290,33 @@ public GetAzConnectedKubernetes_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -317,7 +369,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,7 +390,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -376,12 +428,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,15 +450,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -416,12 +468,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,8 +485,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs index f3963f64a23d..6d43bd6e9075 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetes_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetes_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class GetAzConnectedKubernetes_GetViaIdentity : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class GetAzConnectedKubernetes_GetViaIdentity : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -89,7 +110,7 @@ public partial class GetAzConnectedKubernetes_GetViaIdentity : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -112,24 +133,24 @@ public partial class GetAzConnectedKubernetes_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 Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -152,6 +173,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -173,7 +199,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetes_GetViaIdentity() { @@ -224,8 +250,33 @@ public GetAzConnectedKubernetes_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -278,7 +329,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -316,7 +367,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -354,12 +405,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -376,7 +427,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -394,12 +445,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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 ) { @@ -411,8 +462,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs index 9736893e84ac..bc1eaa97c829 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// API to enumerate registered connected K8s clusters under a Resource Group @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetes_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to enumerate registered connected K8s clusters under a Resource Group")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetes_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzConnectedKubernetes_List : global::System.Management.A /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzConnectedKubernetes_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -84,7 +105,7 @@ public partial class GetAzConnectedKubernetes_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -130,7 +151,8 @@ public partial class GetAzConnectedKubernetes_List : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -139,24 +161,24 @@ public partial class GetAzConnectedKubernetes_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 Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList /// 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) @@ -179,6 +201,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -200,7 +227,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetes_List() { @@ -251,8 +278,33 @@ public GetAzConnectedKubernetes_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -305,7 +357,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -326,7 +378,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -364,12 +416,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,15 +438,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -404,12 +456,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,15 +473,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs index 796d6f6dec57..a1a3d7d0d95e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/GetAzConnectedKubernetes_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// API to enumerate registered connected K8s clusters under a Subscription @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetes_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to enumerate registered connected K8s clusters under a Subscription")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters", ApiVersion = "2024-07-15-preview")] public partial class GetAzConnectedKubernetes_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzConnectedKubernetes_List1 : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzConnectedKubernetes_List1 : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -84,7 +105,7 @@ public partial class GetAzConnectedKubernetes_List1 : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,7 +137,8 @@ public partial class GetAzConnectedKubernetes_List1 : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -125,24 +147,24 @@ public partial class GetAzConnectedKubernetes_List1 : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -186,7 +213,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzConnectedKubernetes_List1() { @@ -237,8 +264,33 @@ public GetAzConnectedKubernetes_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -291,7 +343,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -312,7 +364,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -350,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -372,15 +424,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -390,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList /// 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 ) { @@ -407,15 +459,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs index 2fa30b578158..70d194357efc 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/NewAzConnectedKubernetes_CreateExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzConnectedKubernetes_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,7 +41,19 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Represents a connected cluster. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster _connectedClusterBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster(); + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster _connectedClusterBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// The list of AAD group object IDs that will have admin role of the cluster. [global::System.Management.Automation.AllowEmptyCollection] @@ -50,7 +65,7 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma Description = @"The list of AAD group object IDs that will have admin role of the cluster.", SerializedName = @"adminGroupObjectIDs", PossibleTypes = new [] { typeof(string) })] - public string[] AadProfileAdminGroupObjectID { get => _connectedClusterBody.AadProfileAdminGroupObjectID ?? null /* arrayOf */; set => _connectedClusterBody.AadProfileAdminGroupObjectID = value; } + public string[] AadProfileAdminGroupObjectID { get => _connectedClusterBody.AadProfileAdminGroupObjectID?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.AadProfileAdminGroupObjectID = (value != null ? new System.Collections.Generic.List(value) : null); } /// Whether to enable Azure RBAC for Kubernetes authorization. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable Azure RBAC for Kubernetes authorization.")] @@ -99,9 +114,9 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.", SerializedName = @"agentAutoUpgrade", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions ArcAgentProfileAgentAutoUpgrade { get => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions)""); set => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string ArcAgentProfileAgentAutoUpgrade { get => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade ?? null; set => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade = value; } /// List of arc agentry and system components errors on the cluster resource. [global::System.Management.Automation.AllowEmptyCollection] @@ -112,8 +127,8 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"List of arc agentry and system components errors on the cluster resource.", SerializedName = @"agentErrors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get => _connectedClusterBody.ArcAgentProfileAgentError ?? null /* arrayOf */; set => _connectedClusterBody.ArcAgentProfileAgentError = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[] ArcAgentProfileAgentError { get => _connectedClusterBody.ArcAgentProfileAgentError?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.ArcAgentProfileAgentError = (value != null ? new System.Collections.Generic.List(value) : null); } /// Version of the Arc agents to be installed on the cluster resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Version of the Arc agents to be installed on the cluster resource")] @@ -135,8 +150,8 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"List of system extensions that are installed on the cluster resource.", SerializedName = @"systemComponents", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get => _connectedClusterBody.ArcAgentProfileSystemComponent ?? null /* arrayOf */; set => _connectedClusterBody.ArcAgentProfileSystemComponent = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[] ArcAgentProfileSystemComponent { get => _connectedClusterBody.ArcAgentProfileSystemComponent?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.ArcAgentProfileSystemComponent = (value != null ? new System.Collections.Generic.List(value) : null); } /// Configuration settings for customizing the behavior of the connected cluster. [global::System.Management.Automation.AllowEmptyCollection] @@ -147,8 +162,8 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Configuration settings for customizing the behavior of the connected cluster.", SerializedName = @"arcAgentryConfigurations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get => _connectedClusterBody.ArcAgentryConfiguration ?? null /* arrayOf */; set => _connectedClusterBody.ArcAgentryConfiguration = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[] ArcAgentryConfiguration { get => _connectedClusterBody.ArcAgentryConfiguration?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.ArcAgentryConfiguration = (value != null ? new System.Collections.Generic.List(value) : null); } /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -163,15 +178,18 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit AzureHybridBenefit { get => _connectedClusterBody.AzureHybridBenefit ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit)""); set => _connectedClusterBody.AzureHybridBenefit = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + public string AzureHybridBenefit { get => _connectedClusterBody.AzureHybridBenefit ?? null; set => _connectedClusterBody.AzureHybridBenefit = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -222,6 +240,13 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma PossibleTypes = new [] { typeof(string) })] public string DistributionVersion { get => _connectedClusterBody.DistributionVersion ?? null; set => _connectedClusterBody.DistributionVersion = value; } + /// Determines whether to enable a system-assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines whether to enable a system-assigned identity for the resource.")] + public global::System.Management.Automation.SwitchParameter EnableSystemAssignedIdentity { set => _connectedClusterBody.IdentityType = value.IsPresent ? "SystemAssigned": null ; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Indicates whether the gateway for arc router connectivity is enabled. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the gateway for arc router connectivity is enabled.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Body)] @@ -256,21 +281,6 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// - /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The - /// type 'None' means no identity is assigned to the connected cluster. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get => _connectedClusterBody.IdentityType; set => _connectedClusterBody.IdentityType = value; } - /// /// The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. /// @@ -295,9 +305,9 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"The kind of connected cluster.", SerializedName = @"kind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind Kind { get => _connectedClusterBody.Kind ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind)""); set => _connectedClusterBody.Kind = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + public string Kind { get => _connectedClusterBody.Kind ?? null; set => _connectedClusterBody.Kind = value; } /// The geo-location where the resource lives [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] @@ -353,7 +363,7 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// /// This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster @@ -379,9 +389,9 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Property which describes the state of private link on a connected cluster resource.", SerializedName = @"privateLinkState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState PrivateLinkState { get => _connectedClusterBody.PrivateLinkState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState)""); set => _connectedClusterBody.PrivateLinkState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string PrivateLinkState { get => _connectedClusterBody.PrivateLinkState ?? null; set => _connectedClusterBody.PrivateLinkState = value; } /// Provisioning state of the connected cluster resource. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provisioning state of the connected cluster resource.")] @@ -391,9 +401,9 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Provisioning state of the connected cluster resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState ProvisioningState { get => _connectedClusterBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState)""); set => _connectedClusterBody.ProvisioningState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + public string ProvisioningState { get => _connectedClusterBody.ProvisioningState ?? null; set => _connectedClusterBody.ProvisioningState = value; } /// 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")] @@ -439,7 +449,8 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -452,8 +463,8 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags Tag { get => _connectedClusterBody.Tag ?? null /* object */; set => _connectedClusterBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags Tag { get => _connectedClusterBody.Tag ?? null /* object */; set => _connectedClusterBody.Tag = value; } /// Whether to enable or disable the workload identity Webhook [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable or disable the workload identity Webhook")] @@ -471,24 +482,24 @@ public partial class NewAzConnectedKubernetes_CreateExpanded : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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) @@ -535,6 +546,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets.NewAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,11 +615,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -615,10 +656,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -628,7 +685,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzConnectedKubernetes_CreateExpanded() { @@ -694,7 +751,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -707,12 +764,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConnectedClusterCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterName, _connectedClusterBody, onOk, onDefault, this, Pipeline); + await this.Client.ConnectedClusterCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterName, _connectedClusterBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName,body=_connectedClusterBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -750,12 +807,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -772,15 +829,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_connectedClusterBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_connectedClusterBody }) + 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 } }); @@ -790,12 +847,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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 ) { @@ -807,8 +864,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs index 974f4d1e7743..6ee695fc6748 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class RemoveAzConnectedKubernetes_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,18 @@ public partial class RemoveAzConnectedKubernetes_Delete : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] @@ -47,6 +62,9 @@ public partial class RemoveAzConnectedKubernetes_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -75,6 +93,9 @@ public partial class RemoveAzConnectedKubernetes_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -116,7 +137,7 @@ public partial class RemoveAzConnectedKubernetes_Delete : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +183,8 @@ public partial class RemoveAzConnectedKubernetes_Delete : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,12 +193,12 @@ public partial class RemoveAzConnectedKubernetes_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 Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -242,6 +264,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets.RemoveAzCo /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -306,11 +333,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -322,10 +374,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -393,7 +461,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -411,7 +479,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -424,7 +492,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzConnectedKubernetes_Delete() { @@ -457,12 +525,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,15 +547,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs index 11410ff7ac28..70edaed3fd49 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/RemoveAzConnectedKubernetes_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class RemoveAzConnectedKubernetes_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,18 @@ public partial class RemoveAzConnectedKubernetes_DeleteViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] @@ -47,6 +62,9 @@ public partial class RemoveAzConnectedKubernetes_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class RemoveAzConnectedKubernetes_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -109,7 +130,7 @@ public partial class RemoveAzConnectedKubernetes_DeleteViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -132,12 +153,12 @@ public partial class RemoveAzConnectedKubernetes_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 Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -200,6 +221,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets.RemoveAzCo /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -264,11 +290,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -280,10 +331,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -351,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -389,7 +456,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -402,7 +469,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzConnectedKubernetes_DeleteViaIdentity() { @@ -435,12 +502,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +524,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/SetAzConnectedKubernetes_UpdateExpanded.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/SetAzConnectedKubernetes_UpdateExpanded.cs index f5058a9bf403..4ca9d3db44a1 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/SetAzConnectedKubernetes_UpdateExpanded.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/SetAzConnectedKubernetes_UpdateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// - /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). + /// API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzConnectedKubernetes_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM).")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,7 +41,19 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Represents a connected cluster. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster _connectedClusterBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedCluster(); + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster _connectedClusterBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedCluster(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// The list of AAD group object IDs that will have admin role of the cluster. [global::System.Management.Automation.AllowEmptyCollection] @@ -50,7 +65,7 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma Description = @"The list of AAD group object IDs that will have admin role of the cluster.", SerializedName = @"adminGroupObjectIDs", PossibleTypes = new [] { typeof(string) })] - public string[] AadProfileAdminGroupObjectID { get => _connectedClusterBody.AadProfileAdminGroupObjectID ?? null /* arrayOf */; set => _connectedClusterBody.AadProfileAdminGroupObjectID = value; } + public string[] AadProfileAdminGroupObjectID { get => _connectedClusterBody.AadProfileAdminGroupObjectID?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.AadProfileAdminGroupObjectID = (value != null ? new System.Collections.Generic.List(value) : null); } /// Whether to enable Azure RBAC for Kubernetes authorization. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable Azure RBAC for Kubernetes authorization.")] @@ -99,9 +114,9 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.", SerializedName = @"agentAutoUpgrade", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions ArcAgentProfileAgentAutoUpgrade { get => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions)""); set => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string ArcAgentProfileAgentAutoUpgrade { get => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade ?? null; set => _connectedClusterBody.ArcAgentProfileAgentAutoUpgrade = value; } /// List of arc agentry and system components errors on the cluster resource. [global::System.Management.Automation.AllowEmptyCollection] @@ -112,8 +127,8 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"List of arc agentry and system components errors on the cluster resource.", SerializedName = @"agentErrors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[] ArcAgentProfileAgentError { get => _connectedClusterBody.ArcAgentProfileAgentError ?? null /* arrayOf */; set => _connectedClusterBody.ArcAgentProfileAgentError = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[] ArcAgentProfileAgentError { get => _connectedClusterBody.ArcAgentProfileAgentError?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.ArcAgentProfileAgentError = (value != null ? new System.Collections.Generic.List(value) : null); } /// Version of the Arc agents to be installed on the cluster resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Version of the Arc agents to be installed on the cluster resource")] @@ -135,8 +150,8 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"List of system extensions that are installed on the cluster resource.", SerializedName = @"systemComponents", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[] ArcAgentProfileSystemComponent { get => _connectedClusterBody.ArcAgentProfileSystemComponent ?? null /* arrayOf */; set => _connectedClusterBody.ArcAgentProfileSystemComponent = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[] ArcAgentProfileSystemComponent { get => _connectedClusterBody.ArcAgentProfileSystemComponent?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.ArcAgentProfileSystemComponent = (value != null ? new System.Collections.Generic.List(value) : null); } /// Configuration settings for customizing the behavior of the connected cluster. [global::System.Management.Automation.AllowEmptyCollection] @@ -147,8 +162,8 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Configuration settings for customizing the behavior of the connected cluster.", SerializedName = @"arcAgentryConfigurations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[] ArcAgentryConfiguration { get => _connectedClusterBody.ArcAgentryConfiguration ?? null /* arrayOf */; set => _connectedClusterBody.ArcAgentryConfiguration = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[] ArcAgentryConfiguration { get => _connectedClusterBody.ArcAgentryConfiguration?.ToArray() ?? null /* fixedArrayOf */; set => _connectedClusterBody.ArcAgentryConfiguration = (value != null ? new System.Collections.Generic.List(value) : null); } /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -163,15 +178,18 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit AzureHybridBenefit { get => _connectedClusterBody.AzureHybridBenefit ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit)""); set => _connectedClusterBody.AzureHybridBenefit = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + public string AzureHybridBenefit { get => _connectedClusterBody.AzureHybridBenefit ?? null; set => _connectedClusterBody.AzureHybridBenefit = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -222,6 +240,13 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma PossibleTypes = new [] { typeof(string) })] public string DistributionVersion { get => _connectedClusterBody.DistributionVersion ?? null; set => _connectedClusterBody.DistributionVersion = value; } + /// Determines whether to enable a system-assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Determines whether to enable a system-assigned identity for the resource.")] + public System.Boolean? EnableSystemAssignedIdentity { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Indicates whether the gateway for arc router connectivity is enabled. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the gateway for arc router connectivity is enabled.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Body)] @@ -256,21 +281,6 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// - /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The - /// type 'None' means no identity is assigned to the connected cluster. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get => _connectedClusterBody.IdentityType; set => _connectedClusterBody.IdentityType = value; } - /// /// The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on. /// @@ -295,9 +305,9 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"The kind of connected cluster.", SerializedName = @"kind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind Kind { get => _connectedClusterBody.Kind ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind)""); set => _connectedClusterBody.Kind = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] + public string Kind { get => _connectedClusterBody.Kind ?? null; set => _connectedClusterBody.Kind = value; } /// The geo-location where the resource lives [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] @@ -353,7 +363,7 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// /// This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster @@ -379,9 +389,9 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Property which describes the state of private link on a connected cluster resource.", SerializedName = @"privateLinkState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState PrivateLinkState { get => _connectedClusterBody.PrivateLinkState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState)""); set => _connectedClusterBody.PrivateLinkState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string PrivateLinkState { get => _connectedClusterBody.PrivateLinkState ?? null; set => _connectedClusterBody.PrivateLinkState = value; } /// Provisioning state of the connected cluster resource. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provisioning state of the connected cluster resource.")] @@ -391,9 +401,9 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Provisioning state of the connected cluster resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState ProvisioningState { get => _connectedClusterBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState)""); set => _connectedClusterBody.ProvisioningState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] + public string ProvisioningState { get => _connectedClusterBody.ProvisioningState ?? null; set => _connectedClusterBody.ProvisioningState = value; } /// 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")] @@ -439,7 +449,8 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -452,8 +463,8 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags Tag { get => _connectedClusterBody.Tag ?? null /* object */; set => _connectedClusterBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags Tag { get => _connectedClusterBody.Tag ?? null /* object */; set => _connectedClusterBody.Tag = value; } /// Whether to enable or disable the workload identity Webhook [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable or disable the workload identity Webhook")] @@ -471,24 +482,24 @@ public partial class SetAzConnectedKubernetes_UpdateExpanded : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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) @@ -535,6 +546,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets.SetAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,11 +615,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -615,10 +656,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -686,7 +743,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -699,12 +756,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConnectedClusterCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterName, _connectedClusterBody, onOk, onDefault, this, Pipeline); + await this.Client.ConnectedClusterCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterName, _connectedClusterBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName,body=_connectedClusterBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -717,7 +774,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public SetAzConnectedKubernetes_UpdateExpanded() { @@ -750,12 +807,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -772,15 +829,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.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_connectedClusterBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_connectedClusterBody }) + 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 } }); @@ -790,12 +847,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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 ) { @@ -807,8 +864,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs index 0564ed343aa4..e23c07b0f999 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// API to update certain properties of the connected cluster resource @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedKubernetes_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to update certain properties of the connected cluster resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,7 +39,19 @@ public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Object containing updates for patch operations. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch _connectedClusterPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatch(); + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch _connectedClusterPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatch(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Indicates whether Azure Hybrid Benefit is opted in [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether Azure Hybrid Benefit is opted in")] @@ -46,15 +61,18 @@ public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System ReadOnly = false, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit AzureHybridBenefit { get => _connectedClusterPatchBody.AzureHybridBenefit ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit)""); set => _connectedClusterPatchBody.AzureHybridBenefit = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + public string AzureHybridBenefit { get => _connectedClusterPatchBody.AzureHybridBenefit ?? null; set => _connectedClusterPatchBody.AzureHybridBenefit = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -105,6 +123,9 @@ public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System PossibleTypes = new [] { typeof(string) })] public string DistributionVersion { get => _connectedClusterPatchBody.DistributionVersion ?? null; set => _connectedClusterPatchBody.DistributionVersion = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -131,7 +152,7 @@ public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -177,7 +198,8 @@ public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -190,32 +212,32 @@ public partial class UpdateAzConnectedKubernetes_UpdateExpanded : global::System ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags Tag { get => _connectedClusterPatchBody.Tag ?? null /* object */; set => _connectedClusterPatchBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags Tag { get => _connectedClusterPatchBody.Tag ?? null /* object */; set => _connectedClusterPatchBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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) @@ -238,6 +260,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -302,8 +329,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -359,7 +411,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -372,12 +424,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConnectedClusterUpdate(SubscriptionId, ResourceGroupName, ClusterName, _connectedClusterPatchBody, onOk, onDefault, this, Pipeline); + await this.Client.ConnectedClusterUpdate(SubscriptionId, ResourceGroupName, ClusterName, _connectedClusterPatchBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName,body=_connectedClusterPatchBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -397,7 +449,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzConnectedKubernetes_UpdateExpanded() { @@ -423,12 +475,12 @@ public UpdateAzConnectedKubernetes_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.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,15 +497,15 @@ public UpdateAzConnectedKubernetes_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_connectedClusterPatchBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, body=_connectedClusterPatchBody }) + 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 } }); @@ -463,12 +515,12 @@ public UpdateAzConnectedKubernetes_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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 ) { @@ -480,8 +532,26 @@ public UpdateAzConnectedKubernetes_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs index be9e6b18bce0..af0bbec22541 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/cmdlets/UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets; using System; /// API to update certain properties of the connected cluster resource @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedKubernetes_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"API to update certain properties of the connected cluster resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.HttpPath(Path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}", ApiVersion = "2024-07-15-preview")] public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,7 +39,19 @@ public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : glo private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Object containing updates for patch operations. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatch _connectedClusterPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ConnectedClusterPatch(); + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatch _connectedClusterPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedClusterPatch(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Indicates whether Azure Hybrid Benefit is opted in [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether Azure Hybrid Benefit is opted in")] @@ -46,15 +61,18 @@ public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : glo ReadOnly = false, Description = @"Indicates whether Azure Hybrid Benefit is opted in", SerializedName = @"azureHybridBenefit", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit AzureHybridBenefit { get => _connectedClusterPatchBody.AzureHybridBenefit ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit)""); set => _connectedClusterPatchBody.AzureHybridBenefit = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] + public string AzureHybridBenefit { get => _connectedClusterPatchBody.AzureHybridBenefit ?? null; set => _connectedClusterPatchBody.AzureHybridBenefit = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI; @@ -90,6 +108,9 @@ public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : glo PossibleTypes = new [] { typeof(string) })] public string DistributionVersion { get => _connectedClusterPatchBody.DistributionVersion ?? null; set => _connectedClusterPatchBody.DistributionVersion = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -124,7 +145,7 @@ public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -151,32 +172,32 @@ public partial class UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded : glo ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags Tag { get => _connectedClusterPatchBody.Tag ?? null /* object */; set => _connectedClusterPatchBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags Tag { get => _connectedClusterPatchBody.Tag ?? null /* object */; set => _connectedClusterPatchBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -199,6 +220,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -263,8 +289,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -320,7 +371,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -335,7 +386,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ConnectedClusterUpdateViaIdentity(InputObject.Id, _connectedClusterPatchBody, onOk, onDefault, this, Pipeline); + await this.Client.ConnectedClusterUpdateViaIdentity(InputObject.Id, _connectedClusterPatchBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate); } else { @@ -352,13 +403,13 @@ protected override void ProcessRecord() { 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) ); } - await this.Client.ConnectedClusterUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterName ?? null, _connectedClusterPatchBody, onOk, onDefault, this, Pipeline); + await this.Client.ConnectedClusterUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterName ?? null, _connectedClusterPatchBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_connectedClusterPatchBody}) + 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 } }); @@ -378,7 +429,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded() { @@ -404,12 +455,12 @@ public UpdateAzConnectedKubernetes_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.ConnectedKubernetes.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +477,15 @@ public UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_connectedClusterPatchBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { 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=_connectedClusterPatchBody }) + 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 } }); @@ -444,12 +495,12 @@ public UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster /// 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 ) { @@ -461,8 +512,26 @@ public UpdateAzConnectedKubernetes_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..5bf501c91484 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..aa076e79b644 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index a6c9b5109e35..8392a9dfc890 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -20,11 +20,13 @@ public class ExportFormatPs1xml : PSCmdlet public string FilePath { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; private const string PropertiesExcludedForTableview = @"Id,Type"; private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private static string SelectedBySuffix = @"#Multiple"; + protected override void ProcessRecord() { try @@ -76,7 +78,7 @@ private static View CreateViewModel(ViewParameters viewParameters) Name = viewParameters.Type.FullName, ViewSelectedBy = new ViewSelectedBy { - TypeName = viewParameters.Type.FullName + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) }, TableControl = new TableControl { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index 69a2e99a2a3d..09e55b9038ce 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -24,7 +24,7 @@ public class ExportModelSurface : PSCmdlet public bool UseExpandedFormat { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 94b904b6189d..2d90f40749aa 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 3ba25bd7b9ce..bffa6951aa99 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -137,7 +137,7 @@ protected override void ProcessRecord() } else { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); } @@ -148,8 +148,10 @@ protected override void ProcessRecord() } else { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } } // CmdletsToExport diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index 0508aebc0fb7..a8d1bb9993e2 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -80,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -120,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); - foreach (var variant in variants) + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 4ec0fef5e278..0e91cb0577fd 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 9f44ea7b73e0..e0b0ae464b09 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -31,7 +31,7 @@ internal class MarkdownHelpInfo public string[] Inputs { get; } public string[] Outputs { get; } public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } - public string[] RelatedLinks { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } public bool SupportsShouldProcess { get; } public bool SupportsPaging { get; } @@ -67,7 +67,11 @@ public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; OnlineVersion = commentInfo.OnlineVersion; - RelatedLinks = commentInfo.RelatedLinks; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); SupportsShouldProcess = variantGroup.SupportsShouldProcess; SupportsPaging = variantGroup.SupportsPaging; @@ -218,14 +222,45 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param } } + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + internal static class MarkdownTypesExtensions { public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 0ccd43a6c586..d801a5f52ad9 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -121,6 +121,21 @@ public override string ToString() => CompleterInfo != null : String.Empty; } + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + internal class DefaultInfoOutput { public bool HasDefaultInfo { get; } @@ -173,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -200,6 +216,21 @@ public string GetProcessCustomAttributesAtRuntime() {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetLoginVerification() + { + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + { + return $@" +{Indent}{Indent}$context = Get-AzContext +{Indent}{Indent}if (-not $context -and -not $testPlayback) {{ +{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" +{Indent}{Indent}{Indent}exit +{Indent}{Indent}}} +"; + } + return ""; + } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -232,10 +263,16 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName -{GetTelemetry()} +{Indent}{Indent} +{Indent}{Indent}$testPlayback = $false +{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }} +{GetLoginVerification()}{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}if ($wrappedCmd -eq $null) {{ +{Indent}{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) +{Indent}{Indent}}} {Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) @@ -269,13 +306,16 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to //override default value set in required readme if ("SubscriptionId".Equals(parameterName)) { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); @@ -285,13 +325,15 @@ private string GetDefaultValuesStatements() } else { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); sb.Append($"{Indent}{Indent}}}"); } + } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput @@ -381,6 +423,8 @@ public override string ToString() var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; var examples = ""; foreach (var example in VariantGroup.HelpInfo.Examples) { @@ -393,7 +437,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +631,9 @@ public static string ToSyntaxTypeName(this Type type) public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); - public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index b9814a1bc2fc..93def2293ee5 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,7 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - + public bool IsModelCmdlet { get; } public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +84,7 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - + IsModelCmdlet = Variants.All(v => v.IsModelCmdlet); OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -101,12 +101,23 @@ private string DetermineDefaultParameterSetName() if (String.IsNullOrEmpty(defaultParameterSet)) { var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) .Select(v => ( variant: v.VariantName, paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) .GroupBy(vpc => vpc.isSimple) .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; @@ -134,7 +145,9 @@ internal class Variant public Parameter[] Parameters { get; } public Parameter[] CmdletOnlyParameters { get; } public bool IsInternal { get; } + public bool IsModelCmdlet { get; } public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } public string[] Profiles { get; } public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) @@ -155,6 +168,8 @@ public Variant(string cmdletName, string variantName, CommandInfo info, CommandM Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); IsInternal = Attributes.OfType().Any(); IsDoNotExport = Attributes.OfType().Any(); + IsModelCmdlet = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); } @@ -210,6 +225,7 @@ public ParameterGroup(string parameterName, Parameter[] parameters, string[] all HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); @@ -244,7 +260,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -254,6 +269,7 @@ internal class Parameter public bool SupportsWildcards { get; } public CompleterInfoAttribute CompleterInfoAttribute { get; } public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } public bool ValueFromPipeline { get; } public bool ValueFromPipelineByPropertyName { get; } @@ -286,7 +302,8 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met } SupportsWildcards = Attributes.OfType().Any(); CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); - ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); ValueFromPipeline = ParameterAttribute.ValueFromPipeline; ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; @@ -295,10 +312,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -318,7 +335,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -335,7 +352,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -366,6 +383,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; @@ -391,6 +409,9 @@ public CommentInfo(VariantGroup variantGroup) var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); } } @@ -420,11 +441,22 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + internal class DefaultInfo { public string Name { get; } public string Description { get; } public string Script { get; } + public string SetCondition { get; } public ParameterGroup ParameterGroup { get; } public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) @@ -432,6 +464,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +512,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; @@ -507,7 +541,7 @@ public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute inf public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); - + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 05797a6082a3..261af3b201bd 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -22,6 +22,11 @@ public class DoNotExportAttribute : Attribute { } + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class ModelCmdletAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Class)] public class InternalExportAttribute : Attribute { @@ -55,6 +60,11 @@ public class HttpPathAttribute : Attribute public string ApiVersion { get; set; } } + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { @@ -109,6 +119,11 @@ public enum PropertyOrigin Inlined } + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Property)] public class FormatTableAttribute : Attribute { diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsExtensions.cs index a24d539f9b99..4ab42c6e6502 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerSh { internal static class PsExtensions { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + // https://stackoverflow.com/a/863944/294804 // https://stackoverflow.com/a/4452598/294804 // https://stackoverflow.com/a/28701974/294804 diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsHelpers.cs index 4065aca8634f..8aaafbbc9a7b 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -67,7 +67,7 @@ public static IEnumerable GetScriptHelpInfo(params string[] modulePath public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) { - var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" )); return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) @@ -88,7 +88,7 @@ public static Guid ReadGuidFromPsd1(string psd1Path) if (File.Exists(psd1Path)) { var currentGuid = File.ReadAllLines(psd1Path) - .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault()?.Replace("'", String.Empty); guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; } diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Context.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..447a9b30c13c --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client { get; } + } +} diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Events.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Events.cs index 248d93084a16..5cfc0448118c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Events.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Events.cs @@ -22,6 +22,6 @@ public static partial class Events public const string FollowingNextLink = nameof(FollowingNextLink); public const string DelayBeforePolling = nameof(DelayBeforePolling); public const string Polling = nameof(Polling); - + public const string Progress = nameof(Progress); } -} \ No newline at end of file +} diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/ISendAsync.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/ISendAsync.cs index 04be058362d5..6f281f75ee69 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/ISendAsync.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime using System.Threading.Tasks; using System.Collections; using System.Linq; + using System; + /// /// The interface for sending an HTTP request across the wire. @@ -70,6 +72,7 @@ public interface ISendAsyncTerminalFactory public partial class HttpPipeline : ISendAsync { + private const int DefaultMaxRetry = 3; private ISendAsync pipeline; private ISendAsyncTerminalFactory terminal; private List steps = new List(); @@ -92,6 +95,111 @@ public HttpPipeline(ISendAsyncTerminalFactory terminalStep) /// public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + public ISendAsyncTerminalFactory TerminalFactory { get => terminal; @@ -117,6 +225,11 @@ public ISendAsync Pipeline // create the pipeline from scratch. var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } foreach (var factory in steps) { // skip factories that return null. diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InfoAttribute.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InfoAttribute.cs index f85868d9e5e3..5ead60679d62 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InfoAttribute.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InfoAttribute.cs @@ -11,6 +11,9 @@ public class InfoAttribute : Attribute { public bool Required { get; set; } = false; public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; public Type[] PossibleTypes { get; set; } = new Type[0]; public string Description { get; set; } = ""; public string SerializedName { get; set; } = ""; @@ -30,5 +33,6 @@ public class DefaultInfoAttribute : Attribute public string Script { get; set; } = ""; public string Name { get; set; } = ""; public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InputHandler.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..7419ce877c90 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index 728b253b1328..c628a1a44542 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -21,6 +21,11 @@ internal XNodeArray(params JsonNode[] values) items = new List(values); } + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + public override JsonNode this[int index] => items[index]; internal override JsonType? ElementType => null; diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/SerializationMode.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/SerializationMode.cs index 0e031edcc30d..aff4b47c060c 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/SerializationMode.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/SerializationMode.cs @@ -9,8 +9,10 @@ public enum SerializationMode { None = 0, IncludeHeaders = 1 << 0, - IncludeReadOnly = 1 << 1, - - IncludeAll = IncludeHeaders | IncludeReadOnly + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate } } \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/TypeConverterExtensions.cs b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/TypeConverterExtensions.cs index 64001c607ac3..76d36037493e 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -62,6 +62,56 @@ internal static T[] SelectToArray(object source, System.Func return result.ToArray(); } + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) { if (null != dictionary) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Get-AzConnectedKubernetesOperation.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Get-AzConnectedKubernetesOperation.ps1 index 7b803e6c6840..b04d54b023cf 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Get-AzConnectedKubernetesOperation.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Get-AzConnectedKubernetesOperation.ps1 @@ -25,12 +25,12 @@ Lists all of the available API operations for Connected Cluster resource. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesoperation #> function Get-AzConnectedKubernetesOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesOperation_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/New-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/New-AzConnectedKubernetes.ps1 index 3b14af65b994..223288514454 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/New-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/New-AzConnectedKubernetes.ps1 @@ -39,7 +39,7 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -60,7 +60,7 @@ ARCAGENTRYCONFIGURATION : Configuration settings fo https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes #> function New-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -90,15 +90,6 @@ param( # Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. ${AgentPublicKeyCertificate}, - [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType] - # The type of identity used for the connected cluster. - # The type 'SystemAssigned, includes a system created identity. - # The type 'None' means no identity is assigned to the connected cluster. - ${IdentityType}, - [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] @@ -126,9 +117,9 @@ param( ${AadProfileTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions] + [System.String] # Indicates whether the Arc agents on the be upgraded automatically to the latest version. # Defaults to Enabled. ${ArcAgentProfileAgentAutoUpgrade}, @@ -136,7 +127,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] # List of arc agentry and system components errors on the cluster resource. ${ArcAgentProfileAgentError}, @@ -149,23 +140,21 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] # List of system extensions that are installed on the cluster resource. - # To construct, see NOTES section for ARCAGENTPROFILESYSTEMCOMPONENT properties and create a hash table. ${ArcAgentProfileSystemComponent}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]] # Configuration settings for customizing the behavior of the connected cluster. - # To construct, see NOTES section for ARCAGENTRYCONFIGURATION properties and create a hash table. ${ArcAgentryConfiguration}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -181,6 +170,12 @@ param( # The Kubernetes distribution version on this connected cluster. ${DistributionVersion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.Management.Automation.SwitchParameter] @@ -200,9 +195,9 @@ param( ${Infrastructure}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind] + [System.String] # The kind of connected cluster. ${Kind}, @@ -226,22 +221,22 @@ param( ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -320,13 +315,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.ConnectedKubernetes.private\New-AzConnectedKubernetes_CreateExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -335,6 +331,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/ProxyCmdletDefinitions.ps1 index 39b5e74f4b76..6dc9c7a555da 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -25,12 +25,12 @@ Lists all of the available API operations for Connected Cluster resource. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.connectedkubernetes/get-azconnectedkubernetesoperation #> function Get-AzConnectedKubernetesOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetesOperation_Get'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -149,7 +155,7 @@ New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps New-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -OnboardingTimeout 600 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -170,7 +176,7 @@ ARCAGENTRYCONFIGURATION : Configuration settings fo https://learn.microsoft.com/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes #> function New-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -200,15 +206,6 @@ param( # Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. ${AgentPublicKeyCertificate}, - [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType] - # The type of identity used for the connected cluster. - # The type 'SystemAssigned, includes a system created identity. - # The type 'None' means no identity is assigned to the connected cluster. - ${IdentityType}, - [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.String] @@ -236,9 +233,9 @@ param( ${AadProfileTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions] + [System.String] # Indicates whether the Arc agents on the be upgraded automatically to the latest version. # Defaults to Enabled. ${ArcAgentProfileAgentAutoUpgrade}, @@ -246,7 +243,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] # List of arc agentry and system components errors on the cluster resource. ${ArcAgentProfileAgentError}, @@ -259,23 +256,21 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] # List of system extensions that are installed on the cluster resource. - # To construct, see NOTES section for ARCAGENTPROFILESYSTEMCOMPONENT properties and create a hash table. ${ArcAgentProfileSystemComponent}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]] # Configuration settings for customizing the behavior of the connected cluster. - # To construct, see NOTES section for ARCAGENTRYCONFIGURATION properties and create a hash table. ${ArcAgentryConfiguration}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -291,6 +286,12 @@ param( # The Kubernetes distribution version on this connected cluster. ${DistributionVersion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] [System.Management.Automation.SwitchParameter] @@ -310,9 +311,9 @@ param( ${Infrastructure}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind] + [System.String] # The kind of connected cluster. ${Kind}, @@ -336,22 +337,22 @@ param( ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -430,13 +431,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.ConnectedKubernetes.private\New-AzConnectedKubernetes_CreateExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -445,6 +447,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -530,7 +535,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -607,14 +611,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.ConnectedKubernetes.private\Remove-AzConnectedKubernetes_Delete'; DeleteViaIdentity = 'Az.ConnectedKubernetes.private\Remove-AzConnectedKubernetes_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -623,6 +628,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -654,9 +662,9 @@ end { <# .Synopsis -API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). +API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). .Description -API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). +API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). .Example Set-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -DisableGateway .Example @@ -687,7 +695,7 @@ Set-AzConnectedKubernetes -InputObject $inputObject Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -708,7 +716,7 @@ ARCAGENTRYCONFIGURATION : Configuration settings fo https://learn.microsoft.com/powershell/module/az.connectedkubernetes/set-azconnectedkubernetes #> function Set-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -739,13 +747,10 @@ param( ${AgentPublicKeyCertificate}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType] - # The type of identity used for the connected cluster. - # The type 'SystemAssigned, includes a system created identity. - # The type 'None' means no identity is assigned to the connected cluster. - ${IdentityType}, + [System.Nullable[System.Boolean]] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] @@ -774,9 +779,9 @@ param( ${AadProfileTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions] + [System.String] # Indicates whether the Arc agents on the be upgraded automatically to the latest version. # Defaults to Enabled. ${ArcAgentProfileAgentAutoUpgrade}, @@ -784,7 +789,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] # List of arc agentry and system components errors on the cluster resource. ${ArcAgentProfileAgentError}, @@ -797,23 +802,21 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] # List of system extensions that are installed on the cluster resource. - # To construct, see NOTES section for ARCAGENTPROFILESYSTEMCOMPONENT properties and create a hash table. ${ArcAgentProfileSystemComponent}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]] # Configuration settings for customizing the behavior of the connected cluster. - # To construct, see NOTES section for ARCAGENTRYCONFIGURATION properties and create a hash table. ${ArcAgentryConfiguration}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -848,9 +851,9 @@ param( ${Infrastructure}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind] + [System.String] # The kind of connected cluster. ${Kind}, @@ -874,22 +877,22 @@ param( ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -968,13 +971,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.ConnectedKubernetes.private\Set-AzConnectedKubernetes_UpdateExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -983,6 +987,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -1029,7 +1036,7 @@ Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -1044,7 +1051,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes #> function Update-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1072,13 +1079,12 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -1096,7 +1102,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -1157,14 +1163,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.ConnectedKubernetes.private\Update-AzConnectedKubernetes_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.private\Update-AzConnectedKubernetes_UpdateViaIdentityExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1173,6 +1180,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Remove-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Remove-AzConnectedKubernetes.ps1 index 811f59463f70..42e3da5c2649 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Remove-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Remove-AzConnectedKubernetes.ps1 @@ -70,7 +70,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -147,14 +146,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.ConnectedKubernetes.private\Remove-AzConnectedKubernetes_Delete'; DeleteViaIdentity = 'Az.ConnectedKubernetes.private\Remove-AzConnectedKubernetes_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -163,6 +163,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Set-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Set-AzConnectedKubernetes.ps1 index 04fd8cbf44de..a0600cb7ed1a 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Set-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Set-AzConnectedKubernetes.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). +API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). .Description -API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM). +API to register a new Kubernetes cluster and update a tracked resource in Azure Resource Manager (ARM). .Example Set-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -Location eastus -DisableGateway .Example @@ -49,7 +49,7 @@ Set-AzConnectedKubernetes -InputObject $inputObject Get-AzConnectedKubernetes -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -SubscriptionId $subscriptionId | Set-AzConnectedKubernetes -WorkloadIdentityEnabled:$false .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -70,7 +70,7 @@ ARCAGENTRYCONFIGURATION : Configuration settings fo https://learn.microsoft.com/powershell/module/az.connectedkubernetes/set-azconnectedkubernetes #> function Set-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -101,13 +101,10 @@ param( ${AgentPublicKeyCertificate}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType] - # The type of identity used for the connected cluster. - # The type 'SystemAssigned, includes a system created identity. - # The type 'None' means no identity is assigned to the connected cluster. - ${IdentityType}, + [System.Nullable[System.Boolean]] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] @@ -136,9 +133,9 @@ param( ${AadProfileTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AutoUpgradeOptions] + [System.String] # Indicates whether the Arc agents on the be upgraded automatically to the latest version. # Defaults to Enabled. ${ArcAgentProfileAgentAutoUpgrade}, @@ -146,7 +143,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IAgentError[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IAgentError[]] # List of arc agentry and system components errors on the cluster resource. ${ArcAgentProfileAgentError}, @@ -159,23 +156,21 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.ISystemComponent[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ISystemComponent[]] # List of system extensions that are installed on the cluster resource. - # To construct, see NOTES section for ARCAGENTPROFILESYSTEMCOMPONENT properties and create a hash table. ${ArcAgentProfileSystemComponent}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IArcAgentryConfigurations[]] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IArcAgentryConfigurations[]] # Configuration settings for customizing the behavior of the connected cluster. - # To construct, see NOTES section for ARCAGENTRYCONFIGURATION properties and create a hash table. ${ArcAgentryConfiguration}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -210,9 +205,9 @@ param( ${Infrastructure}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("ProvisionedCluster")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ConnectedClusterKind] + [System.String] # The kind of connected cluster. ${Kind}, @@ -236,22 +231,22 @@ param( ${PrivateLinkScopeResourceId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Enabled", "Disabled")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.PrivateLinkState] + [System.String] # Property which describes the state of private link on a connected cluster resource. ${PrivateLinkState}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState] + [System.String] # Provisioning state of the connected cluster resource. ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -330,13 +325,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.ConnectedKubernetes.private\Set-AzConnectedKubernetes_UpdateExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -345,6 +341,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Update-AzConnectedKubernetes.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Update-AzConnectedKubernetes.ps1 index c1253eec2fa1..4dc4a8bd2f40 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Update-AzConnectedKubernetes.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/internal/Update-AzConnectedKubernetes.ps1 @@ -31,7 +31,7 @@ Update-AzConnectedKubernetes -ClusterName azps_test_cluster_ahb -ResourceGroupNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster +Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes #> function Update-AzConnectedKubernetes { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedCluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -74,13 +74,12 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit])] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PSArgumentCompleterAttribute("True", "False", "NotApplicable")] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.AzureHybridBenefit] + [System.String] # Indicates whether Azure Hybrid Benefit is opted in ${AzureHybridBenefit}, @@ -98,7 +97,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api20240715Preview.IConnectedClusterPatchTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedClusterPatchTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -159,14 +158,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.ConnectedKubernetes.private\Update-AzConnectedKubernetes_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.private\Update-AzConnectedKubernetes_UpdateViaIdentityExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -175,6 +175,9 @@ begin { } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/resources/README.md b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/test-module.ps1 b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/test-module.ps1 index 452ced7ce3c1..1261b4d3d7fc 100644 --- a/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/test-module.ps1 +++ b/generated/ConnectedKubernetes/ConnectedKubernetes.Autorest/test-module.ps1 @@ -12,17 +12,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) $ErrorActionPreference = 'Stop' -if(-not $Isolated) +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' if ($PSBoundParameters.ContainsKey("TestName")) { $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," } $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -34,7 +34,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) @@ -95,4 +95,4 @@ try } } -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file +Write-Host -ForegroundColor Green '-------------Done-------------'