diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.csproj b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.csproj index 0be7428a5618..82db13c96c3d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.csproj +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.csproj @@ -2,9 +2,9 @@ KubernetesConfiguration KubernetesConfiguration + KubernetesConfiguration.Autorest - diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.format.ps1xml b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.format.ps1xml index 241baad7d9bb..d99adea3807f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.format.ps1xml +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.format.ps1xml @@ -2,69 +2,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KubernetesConfigurationIdentity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KubernetesConfigurationIdentity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinition#Multiple - - - - - - - + - + - + - + - + - + - + - ClusterName - - - ClusterResourceName - - - ClusterRp + AccountKey - ExtensionName + ContainerName - FluxConfigurationName + LocalAuthRef - OperationId + SasToken - ResourceGroupName + SyncIntervalInSecond - SourceControlConfigurationName + TimeoutInSecond - SubscriptionId + Url @@ -72,33 +60,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinition#Multiple - + - + - + + + + + + + + + + + + + - Code + AccountKey - Message + ContainerName - Target + LocalAuthRef + + + SasToken + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url @@ -106,27 +118,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinition#Multiple - + - + + + + + + + + + + + + + - PrincipalId + BucketName - TenantId + Insecure + + + LocalAuthRef + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url @@ -134,45 +170,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Plan + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Plan + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinition#Multiple - + - + - + - + - + + + + - Name + BucketName - Product + Insecure - PromotionCode + LocalAuthRef - Publisher + SyncIntervalInSecond - Version + TimeoutInSecond + + + Url @@ -180,21 +222,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatus - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatus#Multiple - + + + + + + + + + + - Name + ComplianceState + + + LastConfigApplied + + + Message + + + MessageLevel @@ -202,21 +262,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettings#Multiple - + - Name + Item @@ -224,51 +284,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail#Multiple - - - - - - - - - - + - + - + - CreatedAt - - - CreatedBy - - - CreatedByType - - - LastModifiedAt + Code - LastModifiedBy + Message - LastModifiedByType + Target @@ -276,57 +318,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension#Multiple - - - - + - + - + - + - + - + - AccountKey - - - ContainerName + Name - LocalAuthRef + ExtensionType - SasToken + Version - SyncIntervalInSecond + ProvisioningState - TimeoutInSecond + AutoUpgradeMinorVersion - Url + ReleaseTrain @@ -334,57 +370,63 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionProperties#Multiple - + - + - + - + - + - + - + + + + - AccountKey + AutoUpgradeMinorVersion - ContainerName + CurrentVersion - LocalAuthRef + ExtensionType - SasToken + IsSystemExtension - SyncIntervalInSecond + PackageUri - TimeoutInSecond + ProvisioningState - Url + ReleaseTrain + + + Version @@ -392,51 +434,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentity#Multiple - - - - - - - - - - - - - + - + - BucketName - - - Insecure - - - LocalAuthRef - - - SyncIntervalInSecond - - - TimeoutInSecond + PrincipalId - Url + TenantId @@ -444,51 +462,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettings#Multiple - - - - - - - - - - - - - - - - + - BucketName - - - Insecure - - - LocalAuthRef - - - SyncIntervalInSecond - - - TimeoutInSecond - - - Url + Item @@ -496,39 +484,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettings#Multiple - - - - - - - - - - + - ComplianceState - - - LastConfigApplied - - - Message - - - MessageLevel + Item @@ -536,9 +506,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettings#Multiple @@ -558,51 +528,67 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionsList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionsList#Multiple - + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatus + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatus#Multiple + + + - + - + - + - + - + - Name - - - ExtensionType + Code - Version + DisplayStatus - ProvisioningState + Level - AutoUpgradeMinorVersion + Message - ReleaseTrain + Time @@ -610,63 +596,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration#Multiple - - - - - - - - - - - - - - - - - - - + - + - AutoUpgradeMinorVersion - - - CurrentVersion - - - ExtensionType - - - IsSystemExtension - - - PackageUri - - - ProvisioningState - - - ReleaseTrain + Name - Version + ResourceGroupName @@ -674,27 +624,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchProperties#Multiple - + - + - PrincipalId + SourceKind - TenantId + Suspend @@ -702,9 +652,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettings#Multiple @@ -724,21 +674,81 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationProperties#Multiple - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Item + ComplianceState + + + ErrorMessage + + + Namespace + + + ProvisioningState + + + RepositoryPublicKey + + + Scope + + + SourceKind + + + SourceSyncedCommitId + + + SourceUpdatedAt + + + StatusUpdatedAt + + + Suspend @@ -746,9 +756,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettings#Multiple @@ -768,9 +778,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionsList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationsList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionsList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationsList#Multiple @@ -790,45 +800,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinition#Multiple - + - + - + - + - + + + + + + + - Code + HttpsCaCert - DisplayStatus + HttpsUser - Level + LocalAuthRef - Message + SshKnownHost - Time + SyncIntervalInSecond + + + TimeoutInSecond + + + Url @@ -836,27 +858,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinition#Multiple - + - + + + + + + + + + + + + + + + + - Name + HttpsCaCert - ResourceGroupName + HttpsUser + + + LocalAuthRef + + + SshKnownHost + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url @@ -864,27 +916,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorProperties#Multiple - + - + - SourceKind + ChartValue - Suspend + ChartVersion @@ -892,21 +944,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinition#Multiple - + + + + + + + + + + - Item + FailureCount + + + InstallFailureCount + + + LastRevisionApplied + + + UpgradeFailureCount @@ -914,125 +984,97 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Identity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Identity#Multiple - + - + + + + + + + PrincipalId + + + TenantId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KubernetesConfigurationIdentity + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KubernetesConfigurationIdentity#Multiple + + + - + - + - + - + - + - + - + - + - + - ComplianceState - - - ErrorMessage - - - Namespace - - - ProvisioningState - - - RepositoryPublicKey + ClusterName - Scope + ClusterResourceName - SourceKind + ClusterRp - SourceSyncedCommitId + ExtensionName - SourceUpdatedAt + FluxConfigurationName - StatusUpdatedAt + OperationId - Suspend - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettings - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettings - - - - - - - - - - + ResourceGroupName + - Item + SourceControlConfigurationName - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationsList - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationsList - - - - - - - - - - - NextLink + SubscriptionId @@ -1040,57 +1082,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KustomizationDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KustomizationDefinition#Multiple - + - + - + - + - + - + - + - HttpsCaCert + Force - HttpsUser + Name - LocalAuthRef + Path - SshKnownHost + Prune - SyncIntervalInSecond + RetryIntervalInSecond - TimeoutInSecond + SyncIntervalInSecond - Url + TimeoutInSecond @@ -1098,23 +1140,23 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KustomizationPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KustomizationPatchDefinition#Multiple - + - + - + - + @@ -1122,24 +1164,21 @@ - - - - HttpsCaCert + Force - HttpsUser + Path - LocalAuthRef + Prune - SshKnownHost + RetryIntervalInSecond SyncIntervalInSecond @@ -1147,8 +1186,27 @@ TimeoutInSecond + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinition#Multiple + + + + + + + + + + - Url + ClientId @@ -1156,27 +1214,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinition#Multiple - + + + + + + + + ClientId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition#Multiple + + + + + - + - ChartValue + Name - ChartVersion + Namespace @@ -1184,39 +1264,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusConditionDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusConditionDefinition#Multiple - + - + - + - + - FailureCount + LastTransitionTime - InstallFailureCount + Message - LastRevisionApplied + Reason - UpgradeFailureCount + Status @@ -1224,63 +1304,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.KustomizationDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.KustomizationDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinition#Multiple - + - + - - - - - - - - - - - - - + - DependsOn + ComplianceState - Force + Kind Name - Path - - - Prune - - - RetryIntervalInSecond - - - SyncIntervalInSecond - - - TimeoutInSecond + Namespace @@ -1288,57 +1344,55 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.KustomizationPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.KustomizationPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusList#Multiple - - - - - - - - - - + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult#Multiple + + + - + - + - + - DependsOn - - - Force - - - Path - - - Prune - - - RetryIntervalInSecond + Name - SyncIntervalInSecond + ResourceGroupName - TimeoutInSecond + Status @@ -1346,21 +1400,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultProperties#Multiple - + - ClientId + Item @@ -1368,21 +1422,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionProperties#Multiple - + + + + + + + - ClientId + AutoUpgradeMinorVersion + + + ReleaseTrain + + + Version @@ -1390,27 +1456,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettings#Multiple - + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettings + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettings#Multiple + + + - + - Name - - - Namespace + Item @@ -1418,39 +1500,45 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusConditionDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Plan - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusConditionDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Plan#Multiple - + - + - + - + + + + - LastTransitionTime + Name - Message + Product - Reason + PromotionCode - Status + Publisher + + + Version @@ -1458,73 +1546,61 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource#Multiple - - - - - - - - - - - ComplianceState - - - Kind - Name - - Namespace - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition#Multiple - + - + - + + + + - AutoUpgradeMinorVersion + Branch - ReleaseTrain + Commit - Version + Semver + + + Tag @@ -1532,21 +1608,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Resource#Multiple - + - Item + Name @@ -1554,21 +1630,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperation - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperation#Multiple - + + + + + + + - Item + IsDataAction + + + Name + + + Origin @@ -1576,39 +1664,61 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplay#Multiple - + - + - + - + - Branch + Description - Commit + Operation - Semver + Provider - Tag + Resource + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationList + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationList#Multiple + + + + + + + + + + + + NextLink @@ -1616,9 +1726,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeCluster + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeCluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeCluster + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeCluster#Multiple @@ -1638,9 +1748,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespace + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespace + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespace#Multiple @@ -1660,9 +1770,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinition#Multiple @@ -1712,9 +1822,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinition#Multiple @@ -1764,9 +1874,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration#Multiple @@ -1798,9 +1908,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationList#Multiple @@ -1820,9 +1930,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationProperties#Multiple @@ -1896,173 +2006,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusList - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusList - - - - - - - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData#Multiple - - - - + - + - - - - - - Name - - - ResourceGroupName - - - Status - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties - - - - + - - - - - - Item - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperation - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperation - - - - + - + - + - IsDataAction - - - Name - - - Origin + CreatedAt - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay - - - - - - - - - - - - - - - - - - - - Description + CreatedBy - Operation + CreatedByType - Provider + LastModifiedAt - Resource + LastModifiedBy - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationList - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationList - - - - - - - - - - - NextLink + LastModifiedByType diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.psd1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.psd1 index a3f1ff722b71..f6095abaa2c4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.psd1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.psd1 @@ -11,8 +11,8 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.KubernetesConfiguration.private.dll' FormatsToProcess = './Az.KubernetesConfiguration.format.ps1xml' - FunctionsToExport = 'Get-AzKubernetesConfigFluxOperationStatus', 'Get-AzKubernetesConfiguration', 'Get-AzKubernetesConfigurationFlux', 'Get-AzKubernetesExtension', 'New-AzKubernetesConfiguration', 'New-AzKubernetesConfigurationFlux', 'New-AzKubernetesExtension', 'Remove-AzKubernetesConfiguration', 'Remove-AzKubernetesConfigurationFlux', 'Remove-AzKubernetesExtension', 'Update-AzKubernetesConfigurationFlux', 'Update-AzKubernetesExtension', '*' - AliasesToExport = 'Get-AzK8sConfigFluxOperationStatus', 'Get-AzK8sConfiguration', 'Get-AzK8sConfigurationFlux', 'Get-AzK8sExtension', 'New-AzK8sConfiguration', 'New-AzK8sConfigurationFlux', 'New-AzK8sExtension', 'Remove-AzK8sConfiguration', 'Remove-AzK8sConfigurationFlux', 'Remove-AzK8sExtension', 'Update-AzK8sConfigurationFlux', 'Update-AzK8sExtension', '*' + FunctionsToExport = 'Get-AzKubernetesConfigFluxOperationStatus', 'Get-AzKubernetesConfiguration', 'Get-AzKubernetesConfigurationFlux', 'Get-AzKubernetesExtension', 'New-AzKubernetesConfiguration', 'New-AzKubernetesConfigurationFlux', 'New-AzKubernetesExtension', 'Remove-AzKubernetesConfiguration', 'Remove-AzKubernetesConfigurationFlux', 'Remove-AzKubernetesExtension', 'Update-AzKubernetesConfigurationFlux', 'Update-AzKubernetesExtension' + AliasesToExport = 'Get-AzK8sConfigFluxOperationStatus', 'Get-AzK8sConfiguration', 'Get-AzK8sConfigurationFlux', 'Get-AzK8sExtension', 'New-AzK8sConfiguration', 'New-AzK8sConfigurationFlux', 'New-AzK8sExtension', 'Remove-AzK8sConfiguration', 'Remove-AzK8sConfigurationFlux', 'Remove-AzK8sExtension', 'Update-AzK8sConfigurationFlux', 'Update-AzK8sExtension' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'KubernetesConfiguration' diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Properties/AssemblyInfo.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Properties/AssemblyInfo.cs index 57a258582182..2935ccf827e1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Properties/AssemblyInfo.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/Properties/AssemblyInfo.cs @@ -1,28 +1,26 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the ""License""); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, +// distributed under the License is distributed on an ""AS IS"" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// ---------------------------------------------------------------------------------- +// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +// is regenerated. using System; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("Microsoft Azure Powershell - KubernetesConfiguration")] -[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] -[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] -[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] - -[assembly: ComVisible(false)] -[assembly: CLSCompliant(false)] -[assembly: Guid("eb4136f0-3745-4c16-a225-1b0fee00bfee")] -[assembly: AssemblyVersion("0.7.3")] -[assembly: AssemblyFileVersion("0.7.3")] +[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 - KubernetesConfiguration")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.7.3")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.7.3")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/check-dependencies.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/check-dependencies.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 index ed478bf92f7e..09e7de41c65d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 @@ -25,13 +25,13 @@ Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -Clu .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -47,7 +47,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigFluxOperationStatus { [Alias('Get-AzK8sConfigFluxOperationStatus')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -153,6 +153,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -175,9 +184,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -191,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfiguration.ps1 index e6ce28b41478..fff5c291a66c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfiguration.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfiguration.ps1 @@ -27,13 +27,13 @@ Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName az .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfiguration { [Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -154,6 +154,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -177,9 +186,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -193,6 +200,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigurationFlux.ps1 index eeac29e78e7b..3762e032e41a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesConfigurationFlux.ps1 @@ -27,13 +27,13 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigurationFlux { [Alias('Get-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -154,6 +154,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -177,9 +186,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -193,6 +200,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesExtension.ps1 index c4c5e2723643..a7282b655e37 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Get-AzKubernetesExtension.ps1 @@ -27,13 +27,13 @@ Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Connect .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -154,6 +154,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -177,9 +186,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -193,6 +200,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfiguration.ps1 index d75d92eff8ae..48de56caf874 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfiguration.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfiguration.ps1 @@ -27,13 +27,13 @@ New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName a New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorScope 'cluster' -ClusterType ConnectedClusters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -73,7 +73,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Name-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -116,16 +116,16 @@ param( ${OperatorParam}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType] + [System.String] # Scope at which the operator will be installed. ${OperatorScope}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType] + [System.String] # Type of the operator ${OperatorType}, @@ -203,6 +203,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -224,9 +233,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfiguration'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -240,6 +247,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfigurationFlux.ps1 index 3ad12b88b5ce..b7450b8280e5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesConfigurationFlux.ps1 @@ -36,13 +36,13 @@ $kustomizations = @{ New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux #> function New-AzKubernetesConfigurationFlux { [Alias('New-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -166,7 +166,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -215,7 +215,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, @@ -262,9 +262,9 @@ param( ${RepositoryRefTag}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + [System.String] # Scope at which the operator will be installed. ${Scope}, @@ -305,9 +305,9 @@ param( ${ServicePrincipalTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, @@ -385,6 +385,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -406,9 +415,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfigurationFlux'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -422,6 +429,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesExtension.ps1 index 9ce091ee5422..9be31a89852a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/New-AzKubernetesExtension.ps1 @@ -22,16 +22,16 @@ Create a new Kubernetes Cluster Extension. .Example New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azps_test_group -ExtensionType azuremonitor-containers .Example -New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -IdentityType 'SystemAssigned' +New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -EnableSystemAssignedIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -77,9 +77,9 @@ param( ${ExtensionType}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] + [System.String] # The identity type. ${AkAssignedIdentityType}, @@ -98,24 +98,23 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${IdentityType}, + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] @@ -241,6 +240,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -262,9 +270,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesExtension'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -278,6 +284,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/ProxyCmdletDefinitions.ps1 index 6b75e3b9b637..809fbd66f003 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -25,13 +25,13 @@ Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -Clu .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -47,7 +47,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigFluxOperationStatus { [Alias('Get-AzK8sConfigFluxOperationStatus')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -153,6 +153,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -175,9 +184,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -191,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) @@ -247,13 +257,13 @@ Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName az .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -269,7 +279,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfiguration { [Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -374,6 +384,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -397,9 +416,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -413,6 +430,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) @@ -469,13 +489,13 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -491,7 +511,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigurationFlux { [Alias('Get-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -596,6 +616,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -619,9 +648,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -635,6 +662,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) @@ -691,13 +721,13 @@ Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Connect .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -713,7 +743,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -818,6 +848,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -841,9 +880,7 @@ begin { Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -857,6 +894,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) @@ -913,13 +953,13 @@ New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName a New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorScope 'cluster' -ClusterType ConnectedClusters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -959,7 +999,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Name-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -1002,16 +1042,16 @@ param( ${OperatorParam}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType] + [System.String] # Scope at which the operator will be installed. ${OperatorScope}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType] + [System.String] # Type of the operator ${OperatorType}, @@ -1089,6 +1129,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -1110,9 +1159,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfiguration'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -1126,6 +1173,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) @@ -1191,13 +1241,13 @@ $kustomizations = @{ New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux #> function New-AzKubernetesConfigurationFlux { [Alias('New-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1321,7 +1371,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -1370,7 +1420,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, @@ -1417,9 +1467,9 @@ param( ${RepositoryRefTag}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + [System.String] # Scope at which the operator will be installed. ${Scope}, @@ -1460,9 +1510,9 @@ param( ${ServicePrincipalTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, @@ -1540,6 +1590,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -1561,9 +1620,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfigurationFlux'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -1577,6 +1634,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) @@ -1628,16 +1688,16 @@ Create a new Kubernetes Cluster Extension. .Example New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azps_test_group -ExtensionType azuremonitor-containers .Example -New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -IdentityType 'SystemAssigned' +New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -EnableSystemAssignedIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1683,9 +1743,9 @@ param( ${ExtensionType}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] + [System.String] # The identity type. ${AkAssignedIdentityType}, @@ -1704,24 +1764,23 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${IdentityType}, + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] @@ -1847,6 +1906,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -1868,9 +1936,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesExtension'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -1884,6 +1950,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) @@ -1946,7 +2015,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. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -2081,6 +2150,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -2103,9 +2181,7 @@ begin { Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2119,6 +2195,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) @@ -2181,7 +2260,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. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -2322,6 +2401,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -2344,9 +2432,7 @@ begin { Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2360,6 +2446,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) @@ -2422,7 +2511,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. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -2563,6 +2652,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -2585,9 +2683,7 @@ begin { Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2601,6 +2697,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) @@ -2657,13 +2756,13 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -2679,7 +2778,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesConfigurationFlux { [Alias('Update-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -2810,7 +2909,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -2859,7 +2958,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, @@ -2935,9 +3034,9 @@ param( ${ServicePrincipalTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, @@ -3015,6 +3114,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -3037,9 +3145,7 @@ begin { UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -3053,6 +3159,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) @@ -3107,13 +3216,13 @@ Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Conn .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -3129,7 +3238,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -3182,14 +3291,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -3276,6 +3385,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -3298,9 +3416,7 @@ begin { UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -3314,6 +3430,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfiguration.ps1 index ccf6eeec8680..7f694393f665 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfiguration.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfiguration.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. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -168,6 +168,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -190,9 +199,7 @@ begin { Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -206,6 +213,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfigurationFlux.ps1 index 243570f70956..e093bce33be4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesConfigurationFlux.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. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -174,6 +174,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -196,9 +205,7 @@ begin { Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -212,6 +219,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesExtension.ps1 index 1be78885b969..feeadec8c1df 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Remove-AzKubernetesExtension.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. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -174,6 +174,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -196,9 +205,7 @@ begin { Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -212,6 +219,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesConfigurationFlux.ps1 index d1436d8daa26..01783882f8c4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesConfigurationFlux.ps1 @@ -27,13 +27,13 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesConfigurationFlux { [Alias('Update-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -180,7 +180,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -229,7 +229,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, @@ -305,9 +305,9 @@ param( ${ServicePrincipalTenantId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, @@ -385,6 +385,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -407,9 +416,7 @@ begin { UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -423,6 +430,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesExtension.ps1 index 4fdf17a5a8be..225aa10340f9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/exports/Update-AzKubernetesExtension.ps1 @@ -25,13 +25,13 @@ Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Conn .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -47,7 +47,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -100,14 +100,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -194,6 +194,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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() @@ -216,9 +225,7 @@ begin { UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -232,6 +239,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generate-info.json b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generate-info.json index ab558f2d9065..dbaadfe8d627 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generate-info.json +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "79702026-dd14-45f0-94ce-39808b466cda" + "generate_Id": "47464fff-3785-45e9-80cd-ccb770a8efa7" } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/Module.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/Module.cs index 4120ca886a0f..274033308046 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/Module.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPi /// 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/KubernetesConfiguration.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/KubernetesConfiguration.cs index 43b2ff253055..0ac089d92995 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/KubernetesConfiguration.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/KubernetesConfiguration.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration public partial class KubernetesConfiguration { - /// Create a new Kubernetes Cluster Extension. + /// create a new Kubernetes Cluster Extension. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -27,10 +27,11 @@ public partial class KubernetesConfiguration /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 ExtensionsCreate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsCreate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -63,15 +64,15 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.ExtensionsCreate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Create a new Kubernetes Cluster Extension. + /// create a new Kubernetes Cluster Extension. /// /// Properties necessary to Create an Extension. /// a delegate that is called when the remote service returns 200 (OK). @@ -79,10 +80,11 @@ public partial class KubernetesConfiguration /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 ExtensionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -130,15 +132,3182 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.ExtensionsCreate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// create a new Kubernetes Cluster Extension. + /// + /// Properties necessary to Create an Extension. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ExtensionsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// create a new Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Json string supplied to the ExtensionsCreate 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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsCreateViaJsonString(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, 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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// create a new Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Json string supplied to the ExtensionsCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// create a new Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Properties necessary to Create an Extension. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ExtensionsCreateWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsCreateWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Properties necessary to Create an Extension. + /// 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 ExtensionsCreate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(extensionName),extensionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == forceDelete ? global::System.String.Empty : "forceDelete=" + global::System.Uri.EscapeDataString(forceDelete.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. + /// + /// + /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == forceDelete ? global::System.String.Empty : "forceDelete=" + global::System.Uri.EscapeDataString(forceDelete.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsDelete_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, bool? forceDelete, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(extensionName),extensionName); + } + } + + /// Gets Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets Kubernetes Cluster Extension. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets Kubernetes Cluster Extension. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsGetWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsGetWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// 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 ExtensionsGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(extensionName),extensionName); + } + } + + /// List all Extensions in the cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List all Extensions in the cluster. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List all Extensions in the cluster. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsListWithResult_Call (request, eventListener,sender); + } + } + + /// List all Extensions in the cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsListWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsListWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// Patch an existing Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Properties to Patch in an existing Extension. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 ExtensionsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Patch an existing Kubernetes Cluster Extension. + /// + /// Properties to Patch in an existing Extension. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 ExtensionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Patch an existing Kubernetes Cluster Extension. + /// + /// Properties to Patch in an existing Extension. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ExtensionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Patch an existing Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Json string supplied to the ExtensionsUpdate 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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, 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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExtensionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Patch an existing Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Json string supplied to the ExtensionsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExtensionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Patch an existing Kubernetes Cluster Extension. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Properties to Patch in an existing Extension. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ExtensionsUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ExtensionsUpdateWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExtensionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// Properties to Patch in an existing Extension. + /// 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 ExtensionsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(extensionName),extensionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get Async Operation status + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// operation Id + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FluxConfigOperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigOperationStatusGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get Async Operation status + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FluxConfigOperationStatusGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "/operations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigOperationStatusGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get Async Operation status + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FluxConfigOperationStatusGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "/operations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigOperationStatusGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get Async Operation status + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// operation Id + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FluxConfigOperationStatusGetWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigOperationStatusGetWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigOperationStatusGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigOperationStatusGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// operation Id + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigOperationStatusGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// update a new Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties necessary to Create a FluxConfiguration. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 FluxConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a new Kubernetes Flux Configuration. + /// + /// Properties necessary to Create a FluxConfiguration. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 FluxConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a new Kubernetes Flux Configuration. + /// + /// Properties necessary to Create a FluxConfiguration. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 FluxConfigurationsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a new Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Json string supplied to the FluxConfigurationsCreateOrUpdate 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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FluxConfigurationsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, 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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a new Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Json string supplied to the FluxConfigurationsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FluxConfigurationsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a new Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties necessary to Create a FluxConfiguration. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 FluxConfigurationsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigurationsCreateOrUpdateWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigurationsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -148,31 +3317,28 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FluxConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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"))) { @@ -181,15 +3347,14 @@ public partial class KubernetesConfiguration if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -198,45 +3363,45 @@ public partial class KubernetesConfiguration _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -255,6 +3420,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -262,13 +3428,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -284,21 +3450,21 @@ public partial class KubernetesConfiguration } /// - /// 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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Extension. - /// Properties necessary to Create an Extension. + /// Name of the Flux Configuration. + /// Properties necessary to Create a FluxConfiguration. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsCreate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FluxConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -310,21 +3476,21 @@ public partial class KubernetesConfiguration await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(extensionName),extensionName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } /// - /// Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. + /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Extension. + /// Name of the Flux Configuration. /// Delete the extension resource in Azure - not the normal asynchronous delete. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -335,7 +3501,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -353,8 +3519,8 @@ public partial class KubernetesConfiguration + global::System.Uri.EscapeDataString(clusterResourceName) + "/" + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + global::System.Uri.EscapeDataString(extensionName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" @@ -370,12 +3536,12 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.FluxConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } /// - /// Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. + /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. /// /// /// Delete the extension resource in Azure - not the normal asynchronous delete. @@ -388,7 +3554,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -396,10 +3562,10 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); } // replace URI parameters with values from identity @@ -408,7 +3574,7 @@ public partial class KubernetesConfiguration var clusterRp = _match.Groups["clusterRp"].Value; var clusterResourceName = _match.Groups["clusterResourceName"].Value; var clusterName = _match.Groups["clusterName"].Value; - var extensionName = _match.Groups["extensionName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -421,8 +3587,8 @@ public partial class KubernetesConfiguration + clusterResourceName + "/" + clusterName - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + extensionName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" @@ -438,11 +3604,11 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.FluxConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -453,32 +3619,29 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FluxConfigurationsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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"))) { @@ -487,15 +3650,14 @@ public partial class KubernetesConfiguration if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -504,45 +3666,45 @@ public partial class KubernetesConfiguration _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -561,6 +3723,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -580,7 +3743,7 @@ public partial class KubernetesConfiguration default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -596,21 +3759,21 @@ public partial class KubernetesConfiguration } /// - /// 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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Extension. + /// Name of the Flux Configuration. /// Delete the extension resource in Azure - not the normal asynchronous delete. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsDelete_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, bool? forceDelete, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FluxConfigurationsDelete_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, bool? forceDelete, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -622,17 +3785,17 @@ public partial class KubernetesConfiguration await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(extensionName),extensionName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); } } - /// Gets Kubernetes Cluster Extension. + /// Gets details of the Flux Configuration. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Extension. + /// Name of the Flux Configuration. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -641,7 +3804,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -659,8 +3822,8 @@ public partial class KubernetesConfiguration + global::System.Uri.EscapeDataString(clusterResourceName) + "/" + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + global::System.Uri.EscapeDataString(extensionName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -674,11 +3837,11 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.FluxConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets Kubernetes Cluster Extension. + /// Gets details of the Flux Configuration. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -688,7 +3851,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -696,10 +3859,10 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); } // replace URI parameters with values from identity @@ -708,7 +3871,7 @@ public partial class KubernetesConfiguration var clusterRp = _match.Groups["clusterRp"].Value; var clusterResourceName = _match.Groups["clusterResourceName"].Value; var clusterName = _match.Groups["clusterName"].Value; - var extensionName = _match.Groups["extensionName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -721,8 +3884,8 @@ public partial class KubernetesConfiguration + clusterResourceName + "/" + clusterName - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + extensionName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -736,200 +3899,181 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.FluxConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets details of the Flux Configuration. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { + var apiVersion = @"2022-11-01"; + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // 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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Extension. - /// 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 ExtensionsGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); - await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(extensionName),extensionName); - } - } - /// List all Extensions in the cluster. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ExtensionsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-11-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/" - + global::System.Uri.EscapeDataString(clusterRp) + + clusterRp + "/" - + global::System.Uri.EscapeDataString(clusterResourceName) + + clusterResourceName + "/" - + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/extensions" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ExtensionsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.FluxConfigurationsGetWithResult_Call (request, eventListener,sender); } } - /// List all Extensions in the 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). + /// Gets details of the Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsGetWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterRp = _match.Groups["clusterRp"].Value; - var clusterResourceName = _match.Groups["clusterResourceName"].Value; - var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/" - + clusterRp + + global::System.Uri.EscapeDataString(clusterRp) + "/" - + clusterResourceName + + global::System.Uri.EscapeDataString(clusterResourceName) + "/" - + clusterName - + "/providers/Microsoft.KubernetesConfiguration/extensions" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigurationsGetWithResult_Call (request, eventListener,sender); + } + } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ExtensionsList_Call(request,onOk,onDefault,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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigurationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -939,7 +4083,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FluxConfigurationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -950,6 +4094,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -957,13 +4102,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -979,7 +4124,7 @@ public partial class KubernetesConfiguration } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// The ID of the target subscription. @@ -987,11 +4132,12 @@ public partial class KubernetesConfiguration /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FluxConfigurationsGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1003,19 +4149,17 @@ public partial class KubernetesConfiguration await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); } } - /// Patch an existing Kubernetes Cluster Extension. + /// List all Flux Configurations. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Extension. - /// Properties to Patch in an existing Extension. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 409 (Conflict). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1023,7 +4167,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -1041,8 +4185,7 @@ public partial class KubernetesConfiguration + global::System.Uri.EscapeDataString(clusterResourceName) + "/" + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + global::System.Uri.EscapeDataString(extensionName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1051,24 +4194,18 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsUpdate_Call(request,onOk,onConflict,onDefault,eventListener,sender); + await this.FluxConfigurationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Patch an existing Kubernetes Cluster Extension. + /// List all Flux Configurations. /// - /// Properties to Patch in an existing Extension. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 409 (Conflict). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1076,7 +4213,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -1084,10 +4221,10 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations'"); } // replace URI parameters with values from identity @@ -1096,7 +4233,6 @@ public partial class KubernetesConfiguration var clusterRp = _match.Groups["clusterRp"].Value; var clusterResourceName = _match.Groups["clusterResourceName"].Value; var clusterName = _match.Groups["clusterName"].Value; - var extensionName = _match.Groups["extensionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1109,8 +4245,7 @@ public partial class KubernetesConfiguration + clusterResourceName + "/" + clusterName - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + extensionName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1119,325 +4254,182 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ExtensionsUpdate_Call(request,onOk,onConflict,onDefault,eventListener,sender); + await this.FluxConfigurationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 409 (Conflict). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// List all Flux Configurations. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { + var apiVersion = @"2022-11-01"; + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - 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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Conflict: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onConflict(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Extension. - /// Properties to Patch in an existing Extension. - /// 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 ExtensionsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); - await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(extensionName),extensionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - /// Get Async Operation status - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Flux Configuration. - /// operation Id - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task FluxConfigOperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-11-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/" - + global::System.Uri.EscapeDataString(clusterRp) + + clusterRp + "/" - + global::System.Uri.EscapeDataString(clusterResourceName) + + clusterResourceName + "/" - + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + global::System.Uri.EscapeDataString(fluxConfigurationName) - + "/operations/" - + global::System.Uri.EscapeDataString(operationId) + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FluxConfigOperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.FluxConfigurationsListWithResult_Call (request, eventListener,sender); } } - /// Get Async Operation status - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// List all Flux Configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigOperationStatusGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsListWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterRp = _match.Groups["clusterRp"].Value; - var clusterResourceName = _match.Groups["clusterResourceName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; - var operationId = _match.Groups["operationId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/" - + clusterRp + + global::System.Uri.EscapeDataString(clusterRp) + "/" - + clusterResourceName + + global::System.Uri.EscapeDataString(clusterResourceName) + "/" - + clusterName - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + fluxConfigurationName - + "/operations/" - + operationId + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FluxConfigOperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.FluxConfigurationsListWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigurationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -1447,7 +4439,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigOperationStatusGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FluxConfigurationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1458,6 +4450,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1465,13 +4458,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1487,21 +4480,19 @@ public partial class KubernetesConfiguration } /// - /// 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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Flux Configuration. - /// operation Id /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigOperationStatusGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FluxConfigurationsList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1513,29 +4504,27 @@ public partial class KubernetesConfiguration await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); - await eventListener.AssertNotNull(nameof(operationId),operationId); } } - /// Create a new Kubernetes Flux Configuration. + /// update an existing Kubernetes Flux Configuration. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Flux Configuration. - /// Properties necessary to Create a FluxConfiguration. + /// Properties to Patch in an existing Flux Configuration. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 400 (BadRequest). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 FluxConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onBadRequest, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -1563,32 +4552,32 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FluxConfigurationsCreateOrUpdate_Call(request,onOk,onBadRequest,onDefault,eventListener,sender); + await this.FluxConfigurationsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Create a new Kubernetes Flux Configuration. + /// update an existing Kubernetes Flux Configuration. /// - /// Properties necessary to Create a FluxConfiguration. + /// Properties to Patch in an existing Flux Configuration. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 400 (BadRequest). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// 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 FluxConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onBadRequest, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -1631,224 +4620,157 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FluxConfigurationsCreateOrUpdate_Call(request,onOk,onBadRequest,onDefault,eventListener,sender); + await this.FluxConfigurationsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 400 (BadRequest). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// update an existing Kubernetes Flux Configuration. + /// + /// Properties to Patch in an existing Flux Configuration. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 FluxConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onBadRequest, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-11-01"; + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // verify that Identity format is an exact match for uri - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.BadRequest: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onBadRequest(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FluxConfigurationsUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. - /// + /// update an existing Kubernetes Flux Configuration. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Flux Configuration. - /// Properties necessary to Create a FluxConfiguration. + /// Json string supplied to the FluxConfigurationsUpdate 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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task FluxConfigurationsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, 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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { + var apiVersion = @"2022-11-01"; + // 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(clusterRp),clusterRp); - await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. - /// + /// update an existing Kubernetes Flux Configuration. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Flux Configuration. - /// Delete the extension resource in Azure - not the normal asynchronous delete. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Json string supplied to the FluxConfigurationsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -1870,95 +4792,236 @@ public partial class KubernetesConfiguration + global::System.Uri.EscapeDataString(fluxConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == forceDelete ? global::System.String.Empty : "forceDelete=" + global::System.Uri.EscapeDataString(forceDelete.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FluxConfigurationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.FluxConfigurationsUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. - /// - /// - /// Delete the extension resource in Azure - not the normal asynchronous delete. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// update an existing Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties to Patch in an existing Flux Configuration. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 FluxConfigurationsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FluxConfigurationsUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterRp = _match.Groups["clusterRp"].Value; - var clusterResourceName = _match.Groups["clusterResourceName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/" - + clusterRp + + global::System.Uri.EscapeDataString(clusterRp) + "/" - + clusterResourceName + + global::System.Uri.EscapeDataString(clusterResourceName) + "/" - + clusterName + + global::System.Uri.EscapeDataString(clusterName) + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + fluxConfigurationName + + global::System.Uri.EscapeDataString(fluxConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == forceDelete ? global::System.String.Empty : "forceDelete=" + global::System.Uri.EscapeDataString(forceDelete.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FluxConfigurationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.FluxConfigurationsUpdateWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FluxConfigurationsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 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. @@ -1966,32 +5029,28 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FluxConfigurationsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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"))) { @@ -2000,15 +5059,14 @@ public partial class KubernetesConfiguration if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -2017,45 +5075,45 @@ public partial class KubernetesConfiguration _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -2064,7 +5122,7 @@ public partial class KubernetesConfiguration } // we are done polling, do a request on final target? // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -2074,6 +5132,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2081,19 +5140,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2109,7 +5162,7 @@ public partial class KubernetesConfiguration } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// The ID of the target subscription. @@ -2118,12 +5171,12 @@ public partial class KubernetesConfiguration /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Flux Configuration. - /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// Properties to Patch in an existing Flux Configuration. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsDelete_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, bool? forceDelete, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FluxConfigurationsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2136,16 +5189,68 @@ public partial class KubernetesConfiguration await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets details of the Flux Configuration. + /// Get Async Operation status /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Flux Configuration. + /// Name of the Extension. + /// operation Id + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationStatusGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get Async Operation status + /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2154,26 +5259,44 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + var operationId = _match.Groups["operationId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/" - + global::System.Uri.EscapeDataString(clusterRp) + + clusterRp + "/" - + global::System.Uri.EscapeDataString(clusterResourceName) + + clusterResourceName + "/" - + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + global::System.Uri.EscapeDataString(fluxConfigurationName) + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "/operations/" + + operationId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2187,21 +5310,19 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FluxConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationStatusGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets details of the Flux Configuration. + /// Get Async Operation status /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2209,10 +5330,10 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}'"); } // replace URI parameters with values from identity @@ -2221,7 +5342,8 @@ public partial class KubernetesConfiguration var clusterRp = _match.Groups["clusterRp"].Value; var clusterResourceName = _match.Groups["clusterResourceName"].Value; var clusterName = _match.Groups["clusterName"].Value; - var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + var extensionName = _match.Groups["extensionName"].Value; + var operationId = _match.Groups["operationId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2234,26 +5356,141 @@ public partial class KubernetesConfiguration + clusterResourceName + "/" + clusterName - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + fluxConfigurationName + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + extensionName + + "/operations/" + + operationId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationStatusGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get Async Operation status + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Extension. + /// operation Id + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationStatusGetWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/extensions/" + + global::System.Uri.EscapeDataString(extensionName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FluxConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.OperationStatusGetWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationStatusGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -2263,7 +5500,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationStatusGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2274,6 +5511,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2281,13 +5519,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2303,7 +5541,7 @@ public partial class KubernetesConfiguration } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// The ID of the target subscription. @@ -2311,12 +5549,13 @@ public partial class KubernetesConfiguration /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. - /// Name of the Flux Configuration. + /// Name of the Extension. + /// operation Id /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationStatusGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2328,11 +5567,12 @@ public partial class KubernetesConfiguration await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + await eventListener.AssertNotNull(nameof(extensionName),extensionName); + await eventListener.AssertNotNull(nameof(operationId),operationId); } } - /// List all Flux Configurations. + /// List Async Operations, currently in progress, in a cluster /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. @@ -2346,7 +5586,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2364,7 +5604,7 @@ public partial class KubernetesConfiguration + global::System.Uri.EscapeDataString(clusterResourceName) + "/" + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + + "/providers/Microsoft.KubernetesConfiguration/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2378,11 +5618,11 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FluxConfigurationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationStatusList_Call (request, onOk,onDefault,eventListener,sender); } } - /// List all Flux Configurations. + /// List Async Operations, currently in progress, in a 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 @@ -2392,7 +5632,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2400,10 +5640,10 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations'"); } // replace URI parameters with values from identity @@ -2424,7 +5664,7 @@ public partial class KubernetesConfiguration + clusterResourceName + "/" + clusterName - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + + "/providers/Microsoft.KubernetesConfiguration/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2436,13 +5676,179 @@ public partial class KubernetesConfiguration var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FluxConfigurationsList_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationStatusList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Async Operations, currently in progress, in a cluster + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationStatusListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationStatusListWithResult_Call (request, eventListener,sender); + } + } + + /// List Async Operations, currently in progress, in a cluster + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationStatusListWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationStatusListWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationStatusListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -2452,7 +5858,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationStatusList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2463,6 +5869,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2470,13 +5877,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2492,7 +5899,7 @@ public partial class KubernetesConfiguration } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// The ID of the target subscription. @@ -2504,7 +5911,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationStatusList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2519,14 +5926,9 @@ public partial class KubernetesConfiguration } } - /// Update an existing Kubernetes Flux Configuration. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Flux Configuration. - /// Properties to Patch in an existing Flux Configuration. + /// + /// List all the available operations the KubernetesConfiguration resource provider supports. + /// /// 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). @@ -2535,7 +5937,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2543,18 +5945,7 @@ public partial class KubernetesConfiguration { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/" - + global::System.Uri.EscapeDataString(clusterRp) - + "/" - + global::System.Uri.EscapeDataString(clusterResourceName) - + "/" - + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + global::System.Uri.EscapeDataString(fluxConfigurationName) + "/providers/Microsoft.KubernetesConfiguration/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2563,22 +5954,19 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FluxConfigurationsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Update an existing Kubernetes Flux Configuration. + /// + /// List all the available operations the KubernetesConfiguration resource provider supports. + /// /// - /// Properties to Patch in an existing Flux Configuration. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2587,7 +5975,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FluxConfigurationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2595,33 +5983,16 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.KubernetesConfiguration/operations'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterRp = _match.Groups["clusterRp"].Value; - var clusterResourceName = _match.Groups["clusterResourceName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/" - + clusterRp - + "/" - + clusterResourceName - + "/" - + clusterName - + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" - + fluxConfigurationName + "/providers/Microsoft.KubernetesConfiguration/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2630,318 +6001,156 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FluxConfigurationsUpdate_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// List all the available operations the KubernetesConfiguration resource provider supports. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Flux Configuration. - /// Properties to Patch in an existing Flux Configuration. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task FluxConfigurationsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); - await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Get Async Operation status - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Extension. - /// operation Id - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/" - + global::System.Uri.EscapeDataString(clusterRp) - + "/" - + global::System.Uri.EscapeDataString(clusterResourceName) - + "/" - + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + global::System.Uri.EscapeDataString(extensionName) - + "/operations/" - + global::System.Uri.EscapeDataString(operationId) + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.KubernetesConfiguration/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.KubernetesConfiguration/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.OperationsListWithResult_Call (request, eventListener,sender); } } - /// Get Async Operation status - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// List all the available operations the KubernetesConfiguration resource provider supports. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterRp = _match.Groups["clusterRp"].Value; - var clusterResourceName = _match.Groups["clusterResourceName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - var extensionName = _match.Groups["extensionName"].Value; - var operationId = _match.Groups["operationId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/" - + clusterRp - + "/" - + clusterResourceName - + "/" - + clusterName - + "/providers/Microsoft.KubernetesConfiguration/extensions/" - + extensionName - + "/operations/" - + operationId + "/providers/Microsoft.KubernetesConfiguration/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -2951,7 +6160,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationStatusGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2962,6 +6171,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2969,13 +6179,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2991,52 +6201,40 @@ public partial class KubernetesConfiguration } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Extension. - /// operation Id /// 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 OperationStatusGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); - await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(extensionName),extensionName); - await eventListener.AssertNotNull(nameof(operationId),operationId); + } } - /// List Async Operations, currently in progress, in a cluster + /// update a new Kubernetes Source Control Configuration. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. + /// Name of the Source Control Configuration. + /// Properties necessary to Create KubernetesConfiguration. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 OperationStatusList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -3054,7 +6252,8 @@ public partial class KubernetesConfiguration + global::System.Uri.EscapeDataString(clusterResourceName) + "/" + global::System.Uri.EscapeDataString(clusterName) - + "/providers/Microsoft.KubernetesConfiguration/operations" + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" + + global::System.Uri.EscapeDataString(sourceControlConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3063,26 +6262,33 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationStatusList_Call(request,onOk,onDefault,eventListener,sender); + await this.SourceControlConfigurationsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// List Async Operations, currently in progress, in a cluster + /// update a new Kubernetes Source Control Configuration. /// + /// Properties necessary to Create KubernetesConfiguration. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 OperationStatusListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -3090,10 +6296,10 @@ public partial class KubernetesConfiguration { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); } // replace URI parameters with values from identity @@ -3102,6 +6308,7 @@ public partial class KubernetesConfiguration var clusterRp = _match.Groups["clusterRp"].Value; var clusterResourceName = _match.Groups["clusterResourceName"].Value; var clusterName = _match.Groups["clusterName"].Value; + var sourceControlConfigurationName = _match.Groups["sourceControlConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3114,7 +6321,8 @@ public partial class KubernetesConfiguration + clusterResourceName + "/" + clusterName - + "/providers/Microsoft.KubernetesConfiguration/operations" + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" + + sourceControlConfigurationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3123,134 +6331,95 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationStatusList_Call(request,onOk,onDefault,eventListener,sender); + await this.SourceControlConfigurationsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// update a new Kubernetes Source Control Configuration. + /// + /// Properties necessary to Create KubernetesConfiguration. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 OperationStatusList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2022-11-01"; + // 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // 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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationStatusList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterRp),clusterRp); - await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - } - } - /// - /// List all the available operations the KubernetesConfiguration resource provider supports. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-11-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var sourceControlConfigurationName = _match.Groups["sourceControlConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.KubernetesConfiguration/operations" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" + + sourceControlConfigurationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.SourceControlConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// List all the available operations the KubernetesConfiguration resource provider supports. - /// - /// + /// update a new Kubernetes Source Control Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Source Control Configuration. + /// Json string supplied to the SourceControlConfigurationsCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3258,24 +6427,26 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.KubernetesConfiguration/operations'"); - } - - // replace URI parameters with values from identity // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.KubernetesConfiguration/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" + + global::System.Uri.EscapeDataString(sourceControlConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3284,98 +6455,34 @@ public partial class KubernetesConfiguration // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - + await this.SourceControlConfigurationsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } - /// Create a new Kubernetes Source Control Configuration. + /// update a new Kubernetes Source Control Configuration. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. - /// Properties necessary to Create KubernetesConfiguration. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Json string supplied to the SourceControlConfigurationsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -3399,93 +6506,149 @@ public partial class KubernetesConfiguration + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SourceControlConfigurationsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + return await this.SourceControlConfigurationsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Create a new Kubernetes Source Control Configuration. - /// + /// update a new Kubernetes Source Control Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Source Control Configuration. /// Properties necessary to Create KubernetesConfiguration. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 SourceControlConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterRp = _match.Groups["clusterRp"].Value; - var clusterResourceName = _match.Groups["clusterResourceName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - var sourceControlConfigurationName = _match.Groups["sourceControlConfigurationName"].Value; // 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/" - + clusterRp + + global::System.Uri.EscapeDataString(clusterRp) + "/" - + clusterResourceName + + global::System.Uri.EscapeDataString(clusterResourceName) + "/" - + clusterName + + global::System.Uri.EscapeDataString(clusterName) + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" - + sourceControlConfigurationName + + global::System.Uri.EscapeDataString(sourceControlConfigurationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SourceControlConfigurationsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + return await this.SourceControlConfigurationsCreateOrUpdateWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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). @@ -3497,7 +6660,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3508,6 +6671,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3515,19 +6679,19 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3557,7 +6721,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3594,7 +6758,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -3627,7 +6791,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SourceControlConfigurationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.SourceControlConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } @@ -3645,7 +6809,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -3693,11 +6857,11 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SourceControlConfigurationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.SourceControlConfigurationsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -3708,32 +6872,29 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { 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.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default 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 ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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"))) { @@ -3742,15 +6903,14 @@ public partial class KubernetesConfiguration if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -3759,45 +6919,45 @@ public partial class KubernetesConfiguration _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); - } - } + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -3819,6 +6979,7 @@ public partial class KubernetesConfiguration break; } } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3838,7 +6999,7 @@ public partial class KubernetesConfiguration default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3884,12 +7045,59 @@ public partial class KubernetesConfiguration } /// Gets details of the Source Control Configuration. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. - /// The name of the kubernetes cluster. - /// Name of the Source Control Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Source Control Configuration. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SourceControlConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" + + global::System.Uri.EscapeDataString(sourceControlConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SourceControlConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets details of the Source Control Configuration. + /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -3898,26 +7106,41 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var sourceControlConfigurationName = _match.Groups["sourceControlConfigurationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/" - + global::System.Uri.EscapeDataString(clusterRp) + + clusterRp + "/" - + global::System.Uri.EscapeDataString(clusterResourceName) + + clusterResourceName + "/" - + global::System.Uri.EscapeDataString(clusterName) + + clusterName + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" - + global::System.Uri.EscapeDataString(sourceControlConfigurationName) + + sourceControlConfigurationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3931,21 +7154,19 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SourceControlConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SourceControlConfigurationsGet_Call (request, onOk,onDefault,eventListener,sender); } } /// Gets details of the Source Control Configuration. /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -3984,20 +7205,132 @@ public partial class KubernetesConfiguration + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SourceControlConfigurationsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets details of the Source Control Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Source Control Configuration. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SourceControlConfigurationsGetWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/" + + global::System.Uri.EscapeDataString(sourceControlConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SourceControlConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.SourceControlConfigurationsGetWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -4007,7 +7340,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4018,6 +7351,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4025,13 +7359,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4090,7 +7424,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -4122,7 +7456,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SourceControlConfigurationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.SourceControlConfigurationsList_Call (request, onOk,onDefault,eventListener,sender); } } @@ -4136,7 +7470,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -4182,11 +7516,179 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SourceControlConfigurationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.SourceControlConfigurationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List all Source Control Configurations. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SourceControlConfigurationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SourceControlConfigurationsListWithResult_Call (request, eventListener,sender); + } + } + + /// List all Source Control Configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SourceControlConfigurationsListWithResult(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-11-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SourceControlConfigurationsListWithResult_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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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 @@ -4196,7 +7698,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4207,6 +7709,7 @@ public partial class KubernetesConfiguration await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4214,13 +7717,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.PowerShell.cs index 576b40cf37aa..8ea9e29c2c81 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.cs index cc7cab495f38..9ef7aa03d25e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.json.cs index 96755aaca5a6..cd0a6f1b7b40 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.PowerShell.cs deleted file mode 100644 index 60a86ebb1469..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.PowerShell.cs +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Parameters to reconcile to the AzureBlob source kind type. - [System.ComponentModel.TypeConverter(typeof(AzureBlobPatchDefinitionTypeConverter))] - public partial class AzureBlobPatchDefinition - { - - /// - /// 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 AzureBlobPatchDefinition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("ManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Url")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).Url, global::System.Convert.ToString); - } - if (content.Contains("ContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ContainerName, global::System.Convert.ToString); - } - if (content.Contains("TimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("SyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("SasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SasToken, global::System.Convert.ToString); - } - if (content.Contains("LocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureBlobPatchDefinition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("ManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Url")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).Url, global::System.Convert.ToString); - } - if (content.Contains("ContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ContainerName, global::System.Convert.ToString); - } - if (content.Contains("TimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("SyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("SasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).SasToken, global::System.Convert.ToString); - } - if (content.Contains("LocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureBlobPatchDefinition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureBlobPatchDefinition(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Parameters to reconcile to the AzureBlob source kind type. - [System.ComponentModel.TypeConverter(typeof(AzureBlobPatchDefinitionTypeConverter))] - public partial interface IAzureBlobPatchDefinition - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.PowerShell.cs deleted file mode 100644 index c498f9ec0eb8..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.PowerShell.cs +++ /dev/null @@ -1,540 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The Extension object. - [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] - public partial class Extension - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Extension(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Extension(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Extension(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Plan")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.PlanTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PlanName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanName, global::System.Convert.ToString); - } - if (content.Contains("PlanPublisher")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPublisher, global::System.Convert.ToString); - } - if (content.Contains("PlanProduct")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanProduct, global::System.Convert.ToString); - } - if (content.Contains("PlanPromotionCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPromotionCode, global::System.Convert.ToString); - } - if (content.Contains("PlanVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanVersion, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("AksAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("ExtensionType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); - } - if (content.Contains("AutoUpgradeMinorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ReleaseTrain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("CurrentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CurrentVersion, global::System.Convert.ToString); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatusTypeConverter.ConvertFrom)); - } - if (content.Contains("CustomLocationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PackageUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); - } - if (content.Contains("IsSystemExtension")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScopeCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeClusterTypeConverter.ConvertFrom); - } - if (content.Contains("ScopeNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespaceTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ClusterReleaseNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - } - if (content.Contains("NamespaceTargetNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoTarget")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorInfoAdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - if (content.Contains("AkAssignedIdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Extension(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Plan")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.PlanTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PlanName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanName, global::System.Convert.ToString); - } - if (content.Contains("PlanPublisher")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPublisher, global::System.Convert.ToString); - } - if (content.Contains("PlanProduct")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanProduct, global::System.Convert.ToString); - } - if (content.Contains("PlanPromotionCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanPromotionCode, global::System.Convert.ToString); - } - if (content.Contains("PlanVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PlanVersion, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("AksAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("ExtensionType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); - } - if (content.Contains("AutoUpgradeMinorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ReleaseTrain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("CurrentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CurrentVersion, global::System.Convert.ToString); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatusTypeConverter.ConvertFrom)); - } - if (content.Contains("CustomLocationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PackageUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); - } - if (content.Contains("IsSystemExtension")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScopeCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeClusterTypeConverter.ConvertFrom); - } - if (content.Contains("ScopeNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespaceTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ClusterReleaseNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - } - if (content.Contains("NamespaceTargetNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoTarget")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorInfoAdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - if (content.Contains("AkAssignedIdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The Extension object. - [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] - public partial interface IExtension - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.PowerShell.cs deleted file mode 100644 index d249c0277ec3..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.PowerShell.cs +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Properties of an Extension resource - [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] - public partial class ExtensionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ExtensionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ExtensionProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ExtensionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("AksAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("ExtensionType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); - } - if (content.Contains("AutoUpgradeMinorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ReleaseTrain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("CurrentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CurrentVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatusTypeConverter.ConvertFrom)); - } - if (content.Contains("CustomLocationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PackageUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); - } - if (content.Contains("IsSystemExtension")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScopeCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeClusterTypeConverter.ConvertFrom); - } - if (content.Contains("ScopeNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespaceTypeConverter.ConvertFrom); - } - if (content.Contains("ClusterReleaseNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - } - if (content.Contains("NamespaceTargetNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoTarget")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorInfoAdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - if (content.Contains("AkAssignedIdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ExtensionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("AksAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("ExtensionType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); - } - if (content.Contains("AutoUpgradeMinorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ReleaseTrain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("CurrentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CurrentVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatusTypeConverter.ConvertFrom)); - } - if (content.Contains("CustomLocationSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PackageUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); - } - if (content.Contains("IsSystemExtension")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScopeCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeClusterTypeConverter.ConvertFrom); - } - if (content.Contains("ScopeNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespaceTypeConverter.ConvertFrom); - } - if (content.Contains("ClusterReleaseNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - } - if (content.Contains("NamespaceTargetNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoTarget")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - } - if (content.Contains("ErrorInfoDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorInfoAdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - if (content.Contains("AkAssignedIdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("AkAssignedIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of an Extension resource - [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] - public partial interface IExtensionProperties - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.PowerShell.cs deleted file mode 100644 index 213c7b7bbc50..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.PowerShell.cs +++ /dev/null @@ -1,662 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The Flux Configuration object returned in Get & Put response. - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationTypeConverter))] - public partial class FluxConfiguration - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FluxConfiguration(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FluxConfiguration(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FluxConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); - } - if (content.Contains("Namespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Namespace, global::System.Convert.ToString); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinitionTypeConverter.ConvertFrom)); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SourceSyncedCommitId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); - } - if (content.Contains("SourceUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("StatusUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); - } - if (content.Contains("ErrorMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ErrorMessage, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FluxConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); - } - if (content.Contains("Namespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Namespace, global::System.Convert.ToString); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinitionTypeConverter.ConvertFrom)); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SourceSyncedCommitId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); - } - if (content.Contains("SourceUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("StatusUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); - } - if (content.Contains("ErrorMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ErrorMessage, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The Flux Configuration object returned in Get & Put response. - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationTypeConverter))] - public partial interface IFluxConfiguration - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.PowerShell.cs deleted file mode 100644 index 12c4b8c807b0..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.PowerShell.cs +++ /dev/null @@ -1,502 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The Flux Configuration Patch Request object. - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchTypeConverter))] - public partial class FluxConfigurationPatch - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FluxConfigurationPatch(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FluxConfigurationPatch(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FluxConfigurationPatch(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FluxConfigurationPatch(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The Flux Configuration Patch Request object. - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchTypeConverter))] - public partial interface IFluxConfigurationPatch - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.PowerShell.cs deleted file mode 100644 index 771b0bdae3c0..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.PowerShell.cs +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Updatable properties of an Flux Configuration Patch Request - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesTypeConverter))] - public partial class FluxConfigurationPatchProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FluxConfigurationPatchProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FluxConfigurationPatchProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FluxConfigurationPatchProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FluxConfigurationPatchProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Updatable properties of an Flux Configuration Patch Request - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesTypeConverter))] - public partial interface IFluxConfigurationPatchProperties - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.PowerShell.cs deleted file mode 100644 index 1d4f40a20787..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.PowerShell.cs +++ /dev/null @@ -1,574 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Properties to create a Flux Configuration resource - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesTypeConverter))] - public partial class FluxConfigurationProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FluxConfigurationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FluxConfigurationProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FluxConfigurationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); - } - if (content.Contains("Namespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Namespace, global::System.Convert.ToString); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinitionTypeConverter.ConvertFrom)); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SourceSyncedCommitId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); - } - if (content.Contains("SourceUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("StatusUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ErrorMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FluxConfigurationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("GitRepository")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Bucket")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlob")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Scope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); - } - if (content.Contains("Namespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Namespace, global::System.Convert.ToString); - } - if (content.Contains("SourceKind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); - } - if (content.Contains("Suspend")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Kustomization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("Statuses")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinitionTypeConverter.ConvertFrom)); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SourceSyncedCommitId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); - } - if (content.Contains("SourceUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("StatusUpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ErrorMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("GitRepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("GitRepositorySshKnownHost")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryHttpsCaCert")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); - } - if (content.Contains("GitRepositoryLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("BucketUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); - } - if (content.Contains("BucketName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketName, global::System.Convert.ToString); - } - if (content.Contains("BucketInsecure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("BucketTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BucketAccessKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); - } - if (content.Contains("BucketLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobServicePrincipal")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobManagedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("AzureBlobUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobTimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobSyncIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("AzureBlobAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobSasToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); - } - if (content.Contains("AzureBlobLocalAuthRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefSemver")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); - } - if (content.Contains("RepositoryRefCommit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificatePassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalClientCertificateSendChain")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ManagedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties to create a Flux Configuration resource - [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesTypeConverter))] - public partial interface IFluxConfigurationProperties - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.PowerShell.cs deleted file mode 100644 index 4b9ba0afbd7c..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.PowerShell.cs +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// - /// Statuses of objects deployed by the user-specified kustomizations from the git repository. - /// - [System.ComponentModel.TypeConverter(typeof(ObjectStatusDefinitionTypeConverter))] - public partial class ObjectStatusDefinition - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ObjectStatusDefinition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ObjectStatusDefinition(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ObjectStatusDefinition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AppliedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedBy = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition) content.GetValueForProperty("AppliedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedBy, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("HelmReleaseProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleaseProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition) content.GetValueForProperty("HelmReleaseProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleaseProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Namespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Namespace, global::System.Convert.ToString); - } - if (content.Contains("Kind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Kind, global::System.Convert.ToString); - } - if (content.Contains("ComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); - } - if (content.Contains("StatusCondition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).StatusCondition = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition[]) content.GetValueForProperty("StatusCondition",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).StatusCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusConditionDefinitionTypeConverter.ConvertFrom)); - } - if (content.Contains("AppliedByName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByName = (string) content.GetValueForProperty("AppliedByName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByName, global::System.Convert.ToString); - } - if (content.Contains("AppliedByNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByNamespace = (string) content.GetValueForProperty("AppliedByNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByNamespace, global::System.Convert.ToString); - } - if (content.Contains("HelmReleasePropertyHelmChartRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition) content.GetValueForProperty("HelmReleasePropertyHelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("HelmReleasePropertyLastRevisionApplied")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied = (long?) content.GetValueForProperty("HelmReleasePropertyLastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmReleasePropertyFailureCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmReleasePropertyInstallFailureCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyInstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmReleasePropertyUpgradeFailureCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyUpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmChartRefName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); - } - if (content.Contains("HelmChartRefNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ObjectStatusDefinition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AppliedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedBy = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition) content.GetValueForProperty("AppliedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedBy, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("HelmReleaseProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleaseProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition) content.GetValueForProperty("HelmReleaseProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleaseProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Namespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Namespace, global::System.Convert.ToString); - } - if (content.Contains("Kind")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).Kind, global::System.Convert.ToString); - } - if (content.Contains("ComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); - } - if (content.Contains("StatusCondition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).StatusCondition = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition[]) content.GetValueForProperty("StatusCondition",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).StatusCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusConditionDefinitionTypeConverter.ConvertFrom)); - } - if (content.Contains("AppliedByName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByName = (string) content.GetValueForProperty("AppliedByName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByName, global::System.Convert.ToString); - } - if (content.Contains("AppliedByNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByNamespace = (string) content.GetValueForProperty("AppliedByNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).AppliedByNamespace, global::System.Convert.ToString); - } - if (content.Contains("HelmReleasePropertyHelmChartRef")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition) content.GetValueForProperty("HelmReleasePropertyHelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinitionTypeConverter.ConvertFrom); - } - if (content.Contains("HelmReleasePropertyLastRevisionApplied")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied = (long?) content.GetValueForProperty("HelmReleasePropertyLastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmReleasePropertyFailureCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmReleasePropertyInstallFailureCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyInstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmReleasePropertyUpgradeFailureCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyUpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("HelmChartRefName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); - } - if (content.Contains("HelmChartRefNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Statuses of objects deployed by the user-specified kustomizations from the git repository. - [System.ComponentModel.TypeConverter(typeof(ObjectStatusDefinitionTypeConverter))] - public partial interface IObjectStatusDefinition - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.PowerShell.cs deleted file mode 100644 index 63d448fac2ec..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.PowerShell.cs +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The SourceControl Configuration object returned in Get & Put response. - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] - public partial class SourceControlConfiguration - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SourceControlConfiguration(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SourceControlConfiguration(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SourceControlConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatusTypeConverter.ConvertFrom); - } - if (content.Contains("OperatorType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("HelmOperatorProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("RepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("OperatorNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); - } - if (content.Contains("OperatorInstanceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); - } - if (content.Contains("OperatorParam")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("OperatorScope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SshKnownHostsContent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - } - if (content.Contains("EnableHelmOperator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - } - if (content.Contains("HelmOperatorPropertyChartVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - } - if (content.Contains("HelmOperatorPropertyChartValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatusMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceStatusComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - } - if (content.Contains("ComplianceStatusLastConfigApplied")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceStatusMessageLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SourceControlConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatusTypeConverter.ConvertFrom); - } - if (content.Contains("OperatorType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("HelmOperatorProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("RepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("OperatorNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); - } - if (content.Contains("OperatorInstanceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); - } - if (content.Contains("OperatorParam")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("OperatorScope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SshKnownHostsContent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - } - if (content.Contains("EnableHelmOperator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - } - if (content.Contains("HelmOperatorPropertyChartVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - } - if (content.Contains("HelmOperatorPropertyChartValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatusMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceStatusComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - } - if (content.Contains("ComplianceStatusLastConfigApplied")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceStatusMessageLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The SourceControl Configuration object returned in Get & Put response. - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] - public partial interface ISourceControlConfiguration - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.PowerShell.cs deleted file mode 100644 index 3e1035355390..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.PowerShell.cs +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Properties to create a Source Control Configuration resource - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] - public partial class SourceControlConfigurationProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SourceControlConfigurationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SourceControlConfigurationProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SourceControlConfigurationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("HelmOperatorProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ComplianceStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatusTypeConverter.ConvertFrom); - } - if (content.Contains("RepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("OperatorNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); - } - if (content.Contains("OperatorInstanceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); - } - if (content.Contains("OperatorType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - } - if (content.Contains("OperatorParam")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("OperatorScope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SshKnownHostsContent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - } - if (content.Contains("EnableHelmOperator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - } - if (content.Contains("HelmOperatorPropertyChartVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - } - if (content.Contains("HelmOperatorPropertyChartValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatusMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatusComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - } - if (content.Contains("ComplianceStatusLastConfigApplied")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceStatusMessageLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SourceControlConfigurationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("HelmOperatorProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ComplianceStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatusTypeConverter.ConvertFrom); - } - if (content.Contains("RepositoryUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); - } - if (content.Contains("OperatorNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); - } - if (content.Contains("OperatorInstanceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); - } - if (content.Contains("OperatorType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - } - if (content.Contains("OperatorParam")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationProtectedSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("OperatorScope")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - } - if (content.Contains("RepositoryPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - } - if (content.Contains("SshKnownHostsContent")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - } - if (content.Contains("EnableHelmOperator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - } - if (content.Contains("HelmOperatorPropertyChartVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - } - if (content.Contains("HelmOperatorPropertyChartValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatusMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - } - if (content.Contains("ComplianceStatusComplianceState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - } - if (content.Contains("ComplianceStatusLastConfigApplied")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ComplianceStatusMessageLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties to create a Source Control Configuration resource - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] - public partial interface ISourceControlConfigurationProperties - - { - - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.PowerShell.cs similarity index 50% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.PowerShell.cs index f5cb45dd104d..b70caddf43ae 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureBlobDefinition 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,73 +78,73 @@ internal AzureBlobDefinition(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ServicePrincipal")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinitionTypeConverter.ConvertFrom); } if (content.Contains("ManagedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinitionTypeConverter.ConvertFrom); } if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("ContainerName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ContainerName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ContainerName, global::System.Convert.ToString); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("AccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).AccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).AccountKey, global::System.Convert.ToString); } if (content.Contains("SasToken")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SasToken, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SasToken, global::System.Convert.ToString); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientCertificate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientCertificatePassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientCertificateSendChain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ManagedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -159,95 +159,93 @@ internal AzureBlobDefinition(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("ServicePrincipal")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinitionTypeConverter.ConvertFrom); } if (content.Contains("ManagedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinitionTypeConverter.ConvertFrom); } if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("ContainerName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ContainerName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ContainerName, global::System.Convert.ToString); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("AccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).AccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).AccountKey, global::System.Convert.ToString); } if (content.Contains("SasToken")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).SasToken, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).SasToken, global::System.Convert.ToString); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientCertificate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientCertificatePassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); } if (content.Contains("ServicePrincipalClientCertificateSendChain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ManagedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)this).ManagedIdentityClientId, 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.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureBlobDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureBlobDefinition(content); } @@ -257,7 +255,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.TypeConverter.cs index 6983597a4c48..6582619d8081 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.cs similarity index 80% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.cs index 4366cf2770a6..73fc0d1fa10a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to reconcile to the AzureBlob source kind type. public partial class AzureBlobDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal { /// Backing field for property. @@ -40,21 +40,21 @@ public partial class AzureBlobDefinition : public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition _managedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition _managedIdentity; /// Parameters to authenticate using a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinition()); set => this._managedIdentity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinition()); set => this._managedIdentity = value; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal)ManagedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal)ManagedIdentity).ClientId = value ?? null; } + public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal)ManagedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal)ManagedIdentity).ClientId = value ?? null; } /// Internal Acessors for ManagedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal.ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinition()); set { {_managedIdentity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal.ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinition()); set { {_managedIdentity = value;} } } /// Internal Acessors for ServicePrincipal - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal.ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinition()); set { {_servicePrincipal = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal.ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinition()); set { {_servicePrincipal = value;} } } /// Backing field for property. private string _sasToken; @@ -64,38 +64,38 @@ public partial class AzureBlobDefinition : public string SasToken { get => this._sasToken; set => this._sasToken = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition _servicePrincipal; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition _servicePrincipal; /// Parameters to authenticate using Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinition()); set => this._servicePrincipal = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinition()); set => this._servicePrincipal = value; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificate = value ?? null; } + public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificate = value ?? null; } /// The password for the certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificatePassword = value ?? null; } + public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificatePassword = value ?? null; } /// /// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based /// authentication for the Client Certificate /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificateSendChain = value ?? default(bool); } + public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientCertificateSendChain = value ?? default(bool); } /// The client Id for authenticating a Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientId = value ?? null; } + public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientId = value ?? null; } /// The client secret for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientSecret = value ?? null; } + public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).ClientSecret = value ?? null; } /// The tenant Id for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)ServicePrincipal).TenantId = value ?? null; } + public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)ServicePrincipal).TenantId = value ?? null; } /// Backing field for property. private long? _syncIntervalInSecond; @@ -136,6 +136,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key (shared key) to access the storage account", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +149,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Blob container name to sync from the url endpoint for the flux configuration.", SerializedName = @"containerName", PossibleTypes = new [] { typeof(string) })] @@ -157,6 +163,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -165,6 +174,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -173,6 +185,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Shared Access token to access the storage container", SerializedName = @"sasToken", PossibleTypes = new [] { typeof(string) })] @@ -181,6 +196,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -189,6 +207,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -200,6 +221,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -208,6 +232,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -216,6 +243,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -224,6 +254,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -234,6 +267,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster Azure Blob source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -244,6 +280,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -252,6 +291,9 @@ public partial interface IAzureBlobDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration Azure Blob storage account.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -274,13 +316,13 @@ internal partial interface IAzureBlobDefinitionInternal /// string LocalAuthRef { get; set; } /// Parameters to authenticate using a Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition ManagedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition ManagedIdentity { get; set; } /// The client Id for authenticating a Managed Identity. string ManagedIdentityClientId { get; set; } /// The Shared Access token to access the storage container string SasToken { get; set; } /// Parameters to authenticate using Service Principal. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition ServicePrincipal { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition ServicePrincipal { get; set; } /// Base64-encoded certificate used to authenticate a Service Principal string ServicePrincipalClientCertificate { get; set; } /// The password for the certificate used to authenticate a Service Principal diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.json.cs similarity index 92% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.json.cs index 2325537c7c6d..3a3656b71a39 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,26 +65,26 @@ internal AzureBlobDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfig { return; } - {_servicePrincipal = If( json?.PropertyT("servicePrincipal"), out var __jsonServicePrincipal) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalDefinition.FromJson(__jsonServicePrincipal) : ServicePrincipal;} - {_managedIdentity = If( json?.PropertyT("managedIdentity"), out var __jsonManagedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityDefinition.FromJson(__jsonManagedIdentity) : ManagedIdentity;} - {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} - {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)AccountKey;} - {_sasToken = If( json?.PropertyT("sasToken"), out var __jsonSasToken) ? (string)__jsonSasToken : (string)SasToken;} - {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + {_servicePrincipal = If( json?.PropertyT("servicePrincipal"), out var __jsonServicePrincipal) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinition.FromJson(__jsonServicePrincipal) : _servicePrincipal;} + {_managedIdentity = If( json?.PropertyT("managedIdentity"), out var __jsonManagedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinition.FromJson(__jsonManagedIdentity) : _managedIdentity;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)_url;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)_containerName;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)_accountKey;} + {_sasToken = If( json?.PropertyT("sasToken"), out var __jsonSasToken) ? (string)__jsonSasToken : (string)_sasToken;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)_localAuthRef;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new AzureBlobDefinition(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.PowerShell.cs new file mode 100644 index 000000000000..75a911d146ac --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.PowerShell.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Parameters to reconcile to the AzureBlob source kind type. + [System.ComponentModel.TypeConverter(typeof(AzureBlobPatchDefinitionTypeConverter))] + public partial class AzureBlobPatchDefinition + { + + /// + /// 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 AzureBlobPatchDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("ManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("ContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ContainerName, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("SasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SasToken, global::System.Convert.ToString); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureBlobPatchDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition) content.GetValueForProperty("ServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("ManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition) content.GetValueForProperty("ManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("ContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ContainerName = (string) content.GetValueForProperty("ContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ContainerName, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("SasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SasToken = (string) content.GetValueForProperty("SasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).SasToken, global::System.Convert.ToString); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureBlobPatchDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureBlobPatchDefinition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters to reconcile to the AzureBlob source kind type. + [System.ComponentModel.TypeConverter(typeof(AzureBlobPatchDefinitionTypeConverter))] + public partial interface IAzureBlobPatchDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.TypeConverter.cs index b697d2435a8d..fbce92782105 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.cs similarity index 80% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.cs index 5738c6cd9f8d..9bcdcef05faf 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to reconcile to the AzureBlob source kind type. public partial class AzureBlobPatchDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal { /// Backing field for property. @@ -40,21 +40,21 @@ public partial class AzureBlobPatchDefinition : public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition _managedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition _managedIdentity; /// Parameters to authenticate using a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinition()); set => this._managedIdentity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinition()); set => this._managedIdentity = value; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal)ManagedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal)ManagedIdentity).ClientId = value ?? null; } + public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal)ManagedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal)ManagedIdentity).ClientId = value ?? null; } /// Internal Acessors for ManagedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal.ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinition()); set { {_managedIdentity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal.ManagedIdentity { get => (this._managedIdentity = this._managedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinition()); set { {_managedIdentity = value;} } } /// Internal Acessors for ServicePrincipal - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal.ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinition()); set { {_servicePrincipal = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal.ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinition()); set { {_servicePrincipal = value;} } } /// Backing field for property. private string _sasToken; @@ -64,38 +64,38 @@ public partial class AzureBlobPatchDefinition : public string SasToken { get => this._sasToken; set => this._sasToken = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition _servicePrincipal; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition _servicePrincipal; /// Parameters to authenticate using Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinition()); set => this._servicePrincipal = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition ServicePrincipal { get => (this._servicePrincipal = this._servicePrincipal ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinition()); set => this._servicePrincipal = value; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificate = value ?? null; } + public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificate = value ?? null; } /// The password for the certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificatePassword = value ?? null; } + public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificatePassword = value ?? null; } /// /// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based /// authentication for the Client Certificate /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificateSendChain = value ?? default(bool); } + public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientCertificateSendChain = value ?? default(bool); } /// The client Id for authenticating a Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientId = value ?? null; } + public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientId = value ?? null; } /// The client secret for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientSecret = value ?? null; } + public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).ClientSecret = value ?? null; } /// The tenant Id for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).TenantId = value ?? null; } + public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)ServicePrincipal).TenantId = value ?? null; } /// Backing field for property. private long? _syncIntervalInSecond; @@ -136,6 +136,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key (shared key) to access the storage account", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +149,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Blob container name to sync from the url endpoint for the flux configuration.", SerializedName = @"containerName", PossibleTypes = new [] { typeof(string) })] @@ -157,6 +163,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -165,6 +174,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -173,6 +185,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Shared Access token to access the storage container", SerializedName = @"sasToken", PossibleTypes = new [] { typeof(string) })] @@ -181,6 +196,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -189,6 +207,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -200,6 +221,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -208,6 +232,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -216,6 +243,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -224,6 +254,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -234,6 +267,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster Azure Blob source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -244,6 +280,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -252,6 +291,9 @@ public partial interface IAzureBlobPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration Azure Blob storage account.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -274,13 +316,13 @@ internal partial interface IAzureBlobPatchDefinitionInternal /// string LocalAuthRef { get; set; } /// Parameters to authenticate using a Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition ManagedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition ManagedIdentity { get; set; } /// The client Id for authenticating a Managed Identity. string ManagedIdentityClientId { get; set; } /// The Shared Access token to access the storage container string SasToken { get; set; } /// Parameters to authenticate using Service Principal. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition ServicePrincipal { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition ServicePrincipal { get; set; } /// Base64-encoded certificate used to authenticate a Service Principal string ServicePrincipalClientCertificate { get; set; } /// The password for the certificate used to authenticate a Service Principal diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.json.cs similarity index 92% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.json.cs index 9df9b6fcd253..4c48b824aeb3 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/AzureBlobPatchDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/AzureBlobPatchDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,26 +65,26 @@ internal AzureBlobPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesC { return; } - {_servicePrincipal = If( json?.PropertyT("servicePrincipal"), out var __jsonServicePrincipal) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ServicePrincipalPatchDefinition.FromJson(__jsonServicePrincipal) : ServicePrincipal;} - {_managedIdentity = If( json?.PropertyT("managedIdentity"), out var __jsonManagedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ManagedIdentityPatchDefinition.FromJson(__jsonManagedIdentity) : ManagedIdentity;} - {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} - {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)AccountKey;} - {_sasToken = If( json?.PropertyT("sasToken"), out var __jsonSasToken) ? (string)__jsonSasToken : (string)SasToken;} - {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + {_servicePrincipal = If( json?.PropertyT("servicePrincipal"), out var __jsonServicePrincipal) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinition.FromJson(__jsonServicePrincipal) : _servicePrincipal;} + {_managedIdentity = If( json?.PropertyT("managedIdentity"), out var __jsonManagedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinition.FromJson(__jsonManagedIdentity) : _managedIdentity;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)_url;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)_containerName;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)_accountKey;} + {_sasToken = If( json?.PropertyT("sasToken"), out var __jsonSasToken) ? (string)__jsonSasToken : (string)_sasToken;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)_localAuthRef;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new AzureBlobPatchDefinition(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.PowerShell.cs similarity index 64% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.PowerShell.cs index 43bb594dca8c..21de11334321 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class BucketDefinition 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,37 +78,37 @@ internal BucketDefinition(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("BucketName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).BucketName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).BucketName, global::System.Convert.ToString); } if (content.Contains("Insecure")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("AccessKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).LocalAuthRef, 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. @@ -123,59 +123,57 @@ internal BucketDefinition(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("BucketName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).BucketName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).BucketName, global::System.Convert.ToString); } if (content.Contains("Insecure")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("AccessKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)this).LocalAuthRef, 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.KubernetesConfiguration.Models.Api20221101.IBucketDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new BucketDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new BucketDefinition(content); } @@ -185,7 +183,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.TypeConverter.cs index d55a26a8f939..56024d7d2e7a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IBucketDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.cs index 747425a29d78..7a74029c1f0e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to reconcile to the Bucket source kind type. public partial class BucketDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal { /// Backing field for property. @@ -85,6 +85,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext access key used to securely access the S3 bucket", SerializedName = @"accessKey", PossibleTypes = new [] { typeof(System.Security.SecureString) })] @@ -93,6 +96,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The bucket name to sync from the url endpoint for the flux configuration.", SerializedName = @"bucketName", PossibleTypes = new [] { typeof(string) })] @@ -103,6 +109,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", SerializedName = @"insecure", PossibleTypes = new [] { typeof(bool) })] @@ -114,6 +123,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -124,6 +136,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster bucket source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -134,6 +149,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster bucket source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -142,6 +160,9 @@ public partial interface IBucketDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration S3 bucket.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.json.cs index 488540e6afb6..8a8fca9d5fd2 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,24 +65,24 @@ internal BucketDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigura { return; } - {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} - {_bucketName = If( json?.PropertyT("bucketName"), out var __jsonBucketName) ? (string)__jsonBucketName : (string)BucketName;} - {_insecure = If( json?.PropertyT("insecure"), out var __jsonInsecure) ? (bool?)__jsonInsecure : Insecure;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_accessKey = If( json?.PropertyT("accessKey"), out var __jsonAccessKey) ? new System.Net.NetworkCredential("",(string)__jsonAccessKey).SecurePassword : AccessKey;} - {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)_url;} + {_bucketName = If( json?.PropertyT("bucketName"), out var __jsonBucketName) ? (string)__jsonBucketName : (string)_bucketName;} + {_insecure = If( json?.PropertyT("insecure"), out var __jsonInsecure) ? (bool?)__jsonInsecure : _insecure;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_accessKey = If( json?.PropertyT("accessKey"), out var __jsonAccessKey) ? new System.Net.NetworkCredential("",(string)__jsonAccessKey).SecurePassword : _accessKey;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)_localAuthRef;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new BucketDefinition(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.PowerShell.cs similarity index 63% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.PowerShell.cs index 297699b776e0..98a3f4de5d3a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class BucketPatchDefinition 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,37 +78,37 @@ internal BucketPatchDefinition(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("BucketName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).BucketName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).BucketName, global::System.Convert.ToString); } if (content.Contains("Insecure")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("AccessKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).LocalAuthRef, 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. @@ -123,59 +123,57 @@ internal BucketPatchDefinition(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("BucketName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).BucketName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).BucketName, global::System.Convert.ToString); } if (content.Contains("Insecure")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("AccessKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)this).LocalAuthRef, 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.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new BucketPatchDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new BucketPatchDefinition(content); } @@ -185,7 +183,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.TypeConverter.cs index ed564c3b8977..6a415892530f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.cs index 8c3f2d4ec334..ad0bec60bb25 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to reconcile to the Bucket source kind type. public partial class BucketPatchDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal { /// Backing field for property. @@ -85,6 +85,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext access key used to securely access the S3 bucket", SerializedName = @"accessKey", PossibleTypes = new [] { typeof(System.Security.SecureString) })] @@ -93,6 +96,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The bucket name to sync from the url endpoint for the flux configuration.", SerializedName = @"bucketName", PossibleTypes = new [] { typeof(string) })] @@ -103,6 +109,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", SerializedName = @"insecure", PossibleTypes = new [] { typeof(bool) })] @@ -114,6 +123,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -124,6 +136,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster bucket source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -134,6 +149,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster bucket source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -142,6 +160,9 @@ public partial interface IBucketPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration S3 bucket.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.json.cs index dbdfe8f4eaae..160d43c49a7e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/BucketPatchDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/BucketPatchDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,24 +65,24 @@ internal BucketPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConf { return; } - {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} - {_bucketName = If( json?.PropertyT("bucketName"), out var __jsonBucketName) ? (string)__jsonBucketName : (string)BucketName;} - {_insecure = If( json?.PropertyT("insecure"), out var __jsonInsecure) ? (bool?)__jsonInsecure : Insecure;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_accessKey = If( json?.PropertyT("accessKey"), out var __jsonAccessKey) ? new System.Net.NetworkCredential("",(string)__jsonAccessKey).SecurePassword : AccessKey;} - {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)_url;} + {_bucketName = If( json?.PropertyT("bucketName"), out var __jsonBucketName) ? (string)__jsonBucketName : (string)_bucketName;} + {_insecure = If( json?.PropertyT("insecure"), out var __jsonInsecure) ? (bool?)__jsonInsecure : _insecure;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_accessKey = If( json?.PropertyT("accessKey"), out var __jsonAccessKey) ? new System.Net.NetworkCredential("",(string)__jsonAccessKey).SecurePassword : _accessKey;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)_localAuthRef;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new BucketPatchDefinition(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.PowerShell.cs similarity index 67% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.PowerShell.cs index cafef211b278..d403176baf14 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ComplianceStatus partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,25 +78,25 @@ internal ComplianceStatus(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ComplianceState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).ComplianceState, global::System.Convert.ToString); } if (content.Contains("LastConfigApplied")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("MessageLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).MessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).MessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).MessageLevel = (string) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).MessageLevel, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -111,47 +111,45 @@ internal ComplianceStatus(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ComplianceState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).ComplianceState, global::System.Convert.ToString); } if (content.Contains("LastConfigApplied")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("MessageLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).MessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)this).MessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).MessageLevel = (string) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)this).MessageLevel, 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.KubernetesConfiguration.Models.Api20221101.IComplianceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ComplianceStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ComplianceStatus(content); } @@ -161,7 +159,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.TypeConverter.cs index 0c7d89a630d5..9019d10ebce0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IComplianceStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.cs index 5c0c628bd20b..c4ced4069dd5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.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.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Compliance Status details public partial class ComplianceStatus : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? _complianceState; + private string _complianceState; /// The compliance state of the configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceState { get => this._complianceState; } + public string ComplianceState { get => this._complianceState; } /// Backing field for property. private global::System.DateTime? _lastConfigApplied; @@ -35,14 +35,14 @@ public partial class ComplianceStatus : public string Message { get => this._message; set => this._message = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? _messageLevel; + private string _messageLevel; /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? MessageLevel { get => this._messageLevel; set => this._messageLevel = value; } + public string MessageLevel { get => this._messageLevel; set => this._messageLevel = value; } /// Internal Acessors for ComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } /// Creates an new instance. public ComplianceStatus() @@ -58,14 +58,21 @@ public partial interface IComplianceStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The compliance state of the configuration.", SerializedName = @"complianceState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Pending", "Compliant", "Noncompliant", "Installed", "Failed")] + string ComplianceState { get; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Datetime the configuration was last applied.", SerializedName = @"lastConfigApplied", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -74,6 +81,9 @@ public partial interface IComplianceStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Message from when the configuration was applied.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -82,10 +92,14 @@ public partial interface IComplianceStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Level of the message.", SerializedName = @"messageLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? MessageLevel { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string MessageLevel { get; set; } } /// Compliance Status details @@ -93,13 +107,15 @@ internal partial interface IComplianceStatusInternal { /// The compliance state of the configuration. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Pending", "Compliant", "Noncompliant", "Installed", "Failed")] + string ComplianceState { get; set; } /// Datetime the configuration was last applied. global::System.DateTime? LastConfigApplied { get; set; } /// Message from when the configuration was applied. string Message { get; set; } /// Level of the message. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? MessageLevel { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string MessageLevel { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.json.cs index d3e8d456f55e..f125dc0a6ce5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ComplianceStatus.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ComplianceStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,21 +65,21 @@ internal ComplianceStatus(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigura { return; } - {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)ComplianceState;} - {_lastConfigApplied = If( json?.PropertyT("lastConfigApplied"), out var __jsonLastConfigApplied) ? global::System.DateTime.TryParse((string)__jsonLastConfigApplied, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastConfigAppliedValue) ? __jsonLastConfigAppliedValue : LastConfigApplied : LastConfigApplied;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_messageLevel = If( json?.PropertyT("messageLevel"), out var __jsonMessageLevel) ? (string)__jsonMessageLevel : (string)MessageLevel;} + {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)_complianceState;} + {_lastConfigApplied = If( json?.PropertyT("lastConfigApplied"), out var __jsonLastConfigApplied) ? global::System.DateTime.TryParse((string)__jsonLastConfigApplied, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastConfigAppliedValue) ? __jsonLastConfigAppliedValue : _lastConfigApplied : _lastConfigApplied;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_messageLevel = If( json?.PropertyT("messageLevel"), out var __jsonMessageLevel) ? (string)__jsonMessageLevel : (string)_messageLevel;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ComplianceStatus(json) : null; } @@ -103,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._complianceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._complianceState.ToString()) : null, "complianceState" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.PowerShell.cs similarity index 88% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.PowerShell.cs index 80e194c732b6..f947e29daddc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -82,7 +82,7 @@ internal ConfigurationProtectedSettings(global::System.Collections.IDictionary c } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,29 +101,29 @@ internal ConfigurationProtectedSettings(global::System.Management.Automation.PSO } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConfigurationProtectedSettings(content); } @@ -133,7 +133,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.TypeConverter.cs index eba8a1cdf2ac..2ce777e6f036 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.cs index b1a07b0005d2..c21cc02aff7d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Name-value pairs of protected configuration settings for the configuration public partial class ConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettingsInternal { /// Creates an new instance. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.dictionary.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.dictionary.cs index 999c4ec34ea6..bd872c35af49 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.json.cs index a974bf605e17..bf44201cdadc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ConfigurationProtectedSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -71,13 +71,13 @@ internal ConfigurationProtectedSettings(Microsoft.Azure.PowerShell.Cmdlets.Kuber } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ConfigurationProtectedSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 78% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index d8eff20a39cc..8d3b14ced98e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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. @@ -106,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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. @@ -131,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -145,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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index 828cf2ffabe3..1542a70b6448 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index 3bce203fbf2d..41e49b0676d9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The resource management error additional info. public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.IAny) })] @@ -55,6 +58,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index 442bc9a308f4..ce4874a7e064 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfig { 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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs similarity index 66% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs index 1bbb448511ea..f48ffba5d408 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs index e4d63e5374aa..da6bb5d89061 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.cs similarity index 67% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.cs index 8287e583d7a6..4c7fa101c116 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The error detail. public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.json.cs similarity index 88% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorDetail.json.cs index 08716aa0dc4b..550b0b780070 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration. { 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.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; } @@ -104,19 +104,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +128,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs similarity index 64% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs index cb278ae450b8..302954453aa8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs index 140986e480fc..9cd699a6a0df 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.cs similarity index 59% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.cs index c3dfbf129ffb..6741a3801061 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -12,54 +12,54 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// the OData error response format.). /// public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Target; } /// Creates an new instance. public ErrorResponse() @@ -76,14 +76,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ErrorResponse.json.cs index acf494e9fc72..a470d96da726 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -68,18 +68,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguratio { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.PowerShell.cs new file mode 100644 index 000000000000..dbffcab6f1bb --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.PowerShell.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The Extension object. + [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] + public partial class Extension + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Extension(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Extension(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Extension(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PlanTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CurrentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CurrentVersion, global::System.Convert.ToString); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("IsSystemExtension")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoDetail = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityType = (string) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityType, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Extension(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PlanTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CurrentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CurrentVersion, global::System.Convert.ToString); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("IsSystemExtension")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoDetail = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityType = (string) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal)this).AkAssignedIdentityType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Extension object. + [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] + public partial interface IExtension + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.TypeConverter.cs index 646258f36927..653dbf905455 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtension ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.cs similarity index 63% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.cs index e7fceedbd7ae..337426316d55 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.cs @@ -3,43 +3,43 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The Extension object. public partial class Extension : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource(); /// The principal ID of resource identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; } + public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; } /// The tenant ID of resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; } + public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; } /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType)""); } + public string AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityType = value ?? null; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 4)] - public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } + public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } /// /// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, @@ -47,54 +47,54 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace = value ?? null; } + public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace = value ?? null; } /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } /// Currently installed version of the extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string CurrentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).CurrentVersion; } + public string CurrentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).CurrentVersion; } /// Custom Location settings properties. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).CustomLocationSetting; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).CustomLocationSetting; } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; } + public System.Collections.Generic.List ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoCode; } + public string ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoCode; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoDetail; } + public System.Collections.Generic.List ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoDetail; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoMessage; } + public string ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoMessage; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoTarget; } + public string ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoTarget; } /// /// Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with @@ -102,128 +102,146 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 1)] - public string ExtensionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ExtensionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ExtensionType = value ?? null; } + public string ExtensionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ExtensionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ExtensionType = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity _identity; /// Identity of the Extension resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Identity()); set => this._identity = value; } /// The principal ID of resource identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId; } + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).PrincipalId; } /// The tenant ID of resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId; } + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).TenantId; } /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).Type = value ?? null; } /// Flag to note if this extension is a system extension [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public bool? IsSystemExtension { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).IsSystemExtension; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } + public bool? IsSystemExtension { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).IsSystemExtension; } /// Internal Acessors for AkAssignedIdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId = value; } /// Internal Acessors for AkAssignedIdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId = value; } /// Internal Acessors for AksAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.AksAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AksAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).AksAssignedIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.AksAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AksAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).AksAssignedIdentity = value; } /// Internal Acessors for CurrentVersion - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.CurrentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).CurrentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).CurrentVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.CurrentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).CurrentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).CurrentVersion = value; } /// Internal Acessors for CustomLocationSetting - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).CustomLocationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).CustomLocationSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).CustomLocationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).CustomLocationSetting = value; } /// Internal Acessors for ErrorInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ErrorInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ErrorInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfo = value; } /// Internal Acessors for ErrorInfoAdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo = value; } /// Internal Acessors for ErrorInfoCode - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoCode = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoCode = value; } /// Internal Acessors for ErrorInfoDetail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoDetail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoDetail = value; } /// Internal Acessors for ErrorInfoMessage - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoMessage = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoMessage = value; } /// Internal Acessors for ErrorInfoTarget - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ErrorInfoTarget = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ErrorInfoTarget = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Identity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for IsSystemExtension - bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.IsSystemExtension { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).IsSystemExtension; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).IsSystemExtension = value; } + bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.IsSystemExtension { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).IsSystemExtension; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).IsSystemExtension = value; } /// Internal Acessors for PackageUri - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).PackageUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).PackageUri = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).PackageUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).PackageUri = value; } /// Internal Acessors for Plan - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Plan()); set { {_plan = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Plan()); set { {_plan = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Scope - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Scope = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Scope = value; } /// Internal Acessors for ScopeCluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ScopeCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ScopeCluster = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ScopeCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ScopeCluster = value; } /// Internal Acessors for ScopeNamespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ScopeNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ScopeNamespace = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ScopeNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ScopeNamespace = value; } /// Internal Acessors for Statuses - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Statuses = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Statuses = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt = value; } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy = value; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType = value; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 0)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it @@ -231,25 +249,25 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace = value ?? null; } + public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace = value ?? null; } /// Uri of the Helm package [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).PackageUri; } + public string PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).PackageUri; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan _plan; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan _plan; /// The plan information. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Plan()); set => this._plan = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Plan()); set => this._plan = value; } /// A user defined name of the 3rd Party Artifact that is being procured. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Name = value ?? null; } + public string PlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Name = value ?? null; } /// /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at @@ -257,37 +275,37 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Product = value ?? null; } + public string PlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Product = value ?? null; } /// /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PlanPromotionCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).PromotionCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).PromotionCode = value ?? null; } + public string PlanPromotionCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).PromotionCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).PromotionCode = value ?? null; } /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Publisher = value ?? null; } + public string PlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Publisher = value ?? null; } /// The version of the desired product/artifact. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PlanVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)Plan).Version = value ?? null; } + public string PlanVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)Plan).Version = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties _property; /// Properties of an Extension resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionProperties()); set => this._property = value; } /// Status of installation of this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 3)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ProvisioningState; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion @@ -295,7 +313,7 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 5)] - public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } + public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] @@ -305,54 +323,54 @@ public partial class Extension : /// Status from this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Statuses; } + public System.Collections.Generic.List Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Statuses; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData _systemData; /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type; } /// /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be @@ -360,7 +378,7 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 2)] - public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal)Property).Version = value ?? null; } + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)Property).Version = value ?? null; } /// Creates an new instance. public Extension() @@ -376,19 +394,22 @@ public Extension() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// The Extension object. public partial interface IExtension : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource { /// The principal ID of resource identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal ID of resource identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -397,6 +418,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant ID of resource.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -405,16 +429,23 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string AkAssignedIdentityType { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(bool) })] @@ -426,6 +457,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created", SerializedName = @"releaseNamespace", PossibleTypes = new [] { typeof(string) })] @@ -436,22 +470,31 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Currently installed version of the extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Currently installed version of the extension.", SerializedName = @"currentVersion", PossibleTypes = new [] { typeof(string) })] @@ -460,22 +503,31 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Custom Location settings properties.", SerializedName = @"customLocationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ErrorInfoAdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -484,14 +536,20 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) })] + System.Collections.Generic.List ErrorInfoDetail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -500,6 +558,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -511,6 +572,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.", SerializedName = @"extensionType", PossibleTypes = new [] { typeof(string) })] @@ -519,6 +583,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal ID of resource identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -527,6 +594,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant ID of resource.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -535,14 +605,21 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned")] + string IdentityType { get; set; } /// Flag to note if this extension is a system extension [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Flag to note if this extension is a system extension", SerializedName = @"isSystemExtension", PossibleTypes = new [] { typeof(bool) })] @@ -554,6 +631,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] @@ -562,6 +642,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Uri of the Helm package", SerializedName = @"packageUri", PossibleTypes = new [] { typeof(string) })] @@ -570,6 +653,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A user defined name of the 3rd Party Artifact that is being procured.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -581,6 +667,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", SerializedName = @"product", PossibleTypes = new [] { typeof(string) })] @@ -591,6 +680,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", SerializedName = @"promotionCode", PossibleTypes = new [] { typeof(string) })] @@ -599,6 +691,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", SerializedName = @"publisher", PossibleTypes = new [] { typeof(string) })] @@ -607,6 +702,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The version of the desired product/artifact.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] @@ -615,10 +713,14 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of installation of this extension.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. @@ -626,6 +728,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] @@ -634,58 +739,81 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status from this extension.", SerializedName = @"statuses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Statuses { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus) })] + System.Collections.Generic.List Statuses { get; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. @@ -693,6 +821,9 @@ public partial interface IExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] @@ -701,16 +832,17 @@ public partial interface IExtension : } /// The Extension object. internal partial interface IExtensionInternal : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResourceInternal { /// The principal ID of resource identity. string AkAssignedIdentityPrincipalId { get; set; } /// The tenant ID of resource. string AkAssignedIdentityTenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string AkAssignedIdentityType { get; set; } /// Identity of the Extension resource in an AKS cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// @@ -723,21 +855,21 @@ internal partial interface IExtensionInternal : /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Currently installed version of the extension. string CurrentVersion { get; set; } /// Custom Location settings properties. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } /// Error information from the Agent - e.g. errors during installation. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail ErrorInfo { get; set; } /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get; set; } + System.Collections.Generic.List ErrorInfoAdditionalInfo { get; set; } /// The error code. string ErrorInfoCode { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get; set; } + System.Collections.Generic.List ErrorInfoDetail { get; set; } /// The error message. string ErrorInfoMessage { get; set; } /// The error target. @@ -748,13 +880,14 @@ internal partial interface IExtensionInternal : /// string ExtensionType { get; set; } /// Identity of the Extension resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity Identity { get; set; } /// The principal ID of resource identity. string IdentityPrincipalId { get; set; } /// The tenant ID of resource. string IdentityTenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned")] + string IdentityType { get; set; } /// Flag to note if this extension is a system extension bool? IsSystemExtension { get; set; } /// @@ -765,7 +898,7 @@ internal partial interface IExtensionInternal : /// Uri of the Helm package string PackageUri { get; set; } /// The plan information. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan Plan { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan Plan { get; set; } /// A user defined name of the 3rd Party Artifact that is being procured. string PlanName { get; set; } /// @@ -782,38 +915,41 @@ internal partial interface IExtensionInternal : /// The version of the desired product/artifact. string PlanVersion { get; set; } /// Properties of an Extension resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties Property { get; set; } /// Status of installation of this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. /// string ReleaseTrain { get; set; } /// Scope at which the extension is installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope Scope { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope Scope { get; set; } /// Specifies that the scope of the extension is Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster ScopeCluster { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster ScopeCluster { get; set; } /// Specifies that the scope of the extension is Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace ScopeNamespace { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace ScopeNamespace { get; set; } /// Status from this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Statuses { get; set; } + System.Collections.Generic.List Statuses { get; set; } /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.json.cs index f7283552d0e3..12b619babf60 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Extension.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Extension.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,22 +65,22 @@ internal Extension(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Ru { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionProperties.FromJson(__jsonProperties) : Property;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity.FromJson(__jsonIdentity) : Identity;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_plan = If( json?.PropertyT("plan"), out var __jsonPlan) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Plan.FromJson(__jsonPlan) : Plan;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionProperties.FromJson(__jsonProperties) : _property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Identity.FromJson(__jsonIdentity) : _identity;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_plan = If( json?.PropertyT("plan"), out var __jsonPlan) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Plan.FromJson(__jsonPlan) : _plan;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Extension(json) : null; } @@ -104,10 +104,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.PowerShell.cs new file mode 100644 index 000000000000..f3f3ac556d72 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.PowerShell.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties of an Extension resource + [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] + public partial class ExtensionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExtensionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExtensionProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExtensionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CurrentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CurrentVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("IsSystemExtension")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoDetail = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (string) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityType, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExtensionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CurrentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CurrentVersion = (string) content.GetValueForProperty("CurrentVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CurrentVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("IsSystemExtension")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).IsSystemExtension = (bool?) content.GetValueForProperty("IsSystemExtension",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).IsSystemExtension, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoDetail = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (string) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal)this).AkAssignedIdentityType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of an Extension resource + [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] + public partial interface IExtensionProperties + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.TypeConverter.cs index 58463fc9ed04..a3673dbf29a1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.cs similarity index 65% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.cs index 441e236dd320..6d129dbd4dc6 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.cs @@ -3,34 +3,34 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties of an Extension resource public partial class ExtensionProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal { /// The principal ID of resource identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; } + public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; } /// The tenant ID of resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; } + public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; } /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType)""); } + public string AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity _aksAssignedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity _aksAssignedIdentity; /// Identity of the Extension resource in an AKS cluster [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentity()); set => this._aksAssignedIdentity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentity()); set => this._aksAssignedIdentity = value; } /// Backing field for property. private bool? _autoUpgradeMinorVersion; @@ -46,23 +46,23 @@ public partial class ExtensionProperties : /// it will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).ClusterReleaseNamespace = value ?? null; } + public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).ClusterReleaseNamespace = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings _configurationSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings _configurationSetting; /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } /// Backing field for property. private string _currentVersion; @@ -72,38 +72,38 @@ public partial class ExtensionProperties : public string CurrentVersion { get => this._currentVersion; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings _customLocationSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings _customLocationSetting; /// Custom Location settings properties. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettings()); } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettings()); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail _errorInfo; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail _errorInfo; /// Error information from the Agent - e.g. errors during installation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail()); } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo; } + public System.Collections.Generic.List ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code; } + public string ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail; } + public System.Collections.Generic.List ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Detail; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message; } + public string ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Message; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target; } + public string ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Target; } /// Backing field for property. private string _extensionType; @@ -123,65 +123,65 @@ public partial class ExtensionProperties : public bool? IsSystemExtension { get => this._isSystemExtension; } /// Internal Acessors for AkAssignedIdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId = value; } /// Internal Acessors for AkAssignedIdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId = value; } /// Internal Acessors for AksAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentity()); set { {_aksAssignedIdentity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentity()); set { {_aksAssignedIdentity = value;} } } /// Internal Acessors for CurrentVersion - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.CurrentVersion { get => this._currentVersion; set { {_currentVersion = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.CurrentVersion { get => this._currentVersion; set { {_currentVersion = value;} } } /// Internal Acessors for CustomLocationSetting - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettings()); set { {_customLocationSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettings()); set { {_customLocationSetting = value;} } } /// Internal Acessors for ErrorInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_errorInfo = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail()); set { {_errorInfo = value;} } } /// Internal Acessors for ErrorInfoAdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).AdditionalInfo = value; } /// Internal Acessors for ErrorInfoCode - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Code = value; } /// Internal Acessors for ErrorInfoDetail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Detail = value; } /// Internal Acessors for ErrorInfoMessage - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Message = value; } /// Internal Acessors for ErrorInfoTarget - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)ErrorInfo).Target = value; } /// Internal Acessors for IsSystemExtension - bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.IsSystemExtension { get => this._isSystemExtension; set { {_isSystemExtension = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.IsSystemExtension { get => this._isSystemExtension; set { {_isSystemExtension = value;} } } /// Internal Acessors for PackageUri - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.PackageUri { get => this._packageUri; set { {_packageUri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.PackageUri { get => this._packageUri; set { {_packageUri = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Scope - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Scope()); set { {_scope = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Scope()); set { {_scope = value;} } } /// Internal Acessors for ScopeCluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).Cluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).Cluster = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).Cluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).Cluster = value; } /// Internal Acessors for ScopeNamespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).Namespace = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).Namespace = value; } /// Internal Acessors for Statuses - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)Scope).NamespaceTargetNamespace = value ?? null; } + public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)Scope).NamespaceTargetNamespace = value ?? null; } /// Backing field for property. private string _packageUri; @@ -191,11 +191,11 @@ public partial class ExtensionProperties : public string PackageUri { get => this._packageUri; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? _provisioningState; + private string _provisioningState; /// Status of installation of this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _releaseTrain; @@ -208,18 +208,18 @@ public partial class ExtensionProperties : public string ReleaseTrain { get => this._releaseTrain; set => this._releaseTrain = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope _scope; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope _scope; /// Scope at which the extension is installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Scope()); set => this._scope = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Scope()); set => this._scope = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] _statuses; + private System.Collections.Generic.List _statuses; /// Status from this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Statuses { get => this._statuses; } + public System.Collections.Generic.List Statuses { get => this._statuses; } /// Backing field for property. private string _version; @@ -245,6 +245,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal ID of resource identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -253,6 +256,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant ID of resource.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -261,16 +267,23 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string AkAssignedIdentityType { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(bool) })] @@ -282,6 +295,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created", SerializedName = @"releaseNamespace", PossibleTypes = new [] { typeof(string) })] @@ -292,22 +308,31 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Currently installed version of the extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Currently installed version of the extension.", SerializedName = @"currentVersion", PossibleTypes = new [] { typeof(string) })] @@ -316,22 +341,31 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Custom Location settings properties.", SerializedName = @"customLocationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List ErrorInfoAdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -340,14 +374,20 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) })] + System.Collections.Generic.List ErrorInfoDetail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -356,6 +396,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -367,6 +410,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.", SerializedName = @"extensionType", PossibleTypes = new [] { typeof(string) })] @@ -375,6 +421,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Flag to note if this extension is a system extension", SerializedName = @"isSystemExtension", PossibleTypes = new [] { typeof(bool) })] @@ -386,6 +435,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] @@ -394,6 +446,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Uri of the Helm package", SerializedName = @"packageUri", PossibleTypes = new [] { typeof(string) })] @@ -402,10 +457,14 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of installation of this extension.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. @@ -413,6 +472,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] @@ -421,10 +483,13 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status from this extension.", SerializedName = @"statuses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Statuses { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus) })] + System.Collections.Generic.List Statuses { get; } /// /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. @@ -432,6 +497,9 @@ public partial interface IExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] @@ -447,9 +515,10 @@ internal partial interface IExtensionPropertiesInternal /// The tenant ID of resource. string AkAssignedIdentityTenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string AkAssignedIdentityType { get; set; } /// Identity of the Extension resource in an AKS cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// @@ -462,21 +531,21 @@ internal partial interface IExtensionPropertiesInternal /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Currently installed version of the extension. string CurrentVersion { get; set; } /// Custom Location settings properties. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } /// Error information from the Agent - e.g. errors during installation. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail ErrorInfo { get; set; } /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get; set; } + System.Collections.Generic.List ErrorInfoAdditionalInfo { get; set; } /// The error code. string ErrorInfoCode { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get; set; } + System.Collections.Generic.List ErrorInfoDetail { get; set; } /// The error message. string ErrorInfoMessage { get; set; } /// The error target. @@ -496,20 +565,21 @@ internal partial interface IExtensionPropertiesInternal /// Uri of the Helm package string PackageUri { get; set; } /// Status of installation of this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. /// string ReleaseTrain { get; set; } /// Scope at which the extension is installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope Scope { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope Scope { get; set; } /// Specifies that the scope of the extension is Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster ScopeCluster { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster ScopeCluster { get; set; } /// Specifies that the scope of the extension is Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace ScopeNamespace { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace ScopeNamespace { get; set; } /// Status from this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus[] Statuses { get; set; } + System.Collections.Generic.List Statuses { get; set; } /// /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.json.cs similarity index 88% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.json.cs index d5d924a846a1..75b83de51b06 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,32 +65,32 @@ internal ExtensionProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfig { return; } - {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Scope.FromJson(__jsonScope) : Scope;} - {_errorInfo = If( json?.PropertyT("errorInfo"), out var __jsonErrorInfo) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__jsonErrorInfo) : ErrorInfo;} - {_aksAssignedIdentity = If( json?.PropertyT("aksAssignedIdentity"), out var __jsonAksAssignedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesAksAssignedIdentity.FromJson(__jsonAksAssignedIdentity) : AksAssignedIdentity;} - {_extensionType = If( json?.PropertyT("extensionType"), out var __jsonExtensionType) ? (string)__jsonExtensionType : (string)ExtensionType;} - {_autoUpgradeMinorVersion = If( json?.PropertyT("autoUpgradeMinorVersion"), out var __jsonAutoUpgradeMinorVersion) ? (bool?)__jsonAutoUpgradeMinorVersion : AutoUpgradeMinorVersion;} - {_releaseTrain = If( json?.PropertyT("releaseTrain"), out var __jsonReleaseTrain) ? (string)__jsonReleaseTrain : (string)ReleaseTrain;} - {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} - {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : ConfigurationSetting;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} - {_currentVersion = If( json?.PropertyT("currentVersion"), out var __jsonCurrentVersion) ? (string)__jsonCurrentVersion : (string)CurrentVersion;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionStatus.FromJson(__u) )) ))() : null : Statuses;} - {_customLocationSetting = If( json?.PropertyT("customLocationSettings"), out var __jsonCustomLocationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettings.FromJson(__jsonCustomLocationSettings) : CustomLocationSetting;} - {_packageUri = If( json?.PropertyT("packageUri"), out var __jsonPackageUri) ? (string)__jsonPackageUri : (string)PackageUri;} - {_isSystemExtension = If( json?.PropertyT("isSystemExtension"), out var __jsonIsSystemExtension) ? (bool?)__jsonIsSystemExtension : IsSystemExtension;} + {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Scope.FromJson(__jsonScope) : _scope;} + {_errorInfo = If( json?.PropertyT("errorInfo"), out var __jsonErrorInfo) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail.FromJson(__jsonErrorInfo) : _errorInfo;} + {_aksAssignedIdentity = If( json?.PropertyT("aksAssignedIdentity"), out var __jsonAksAssignedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesAksAssignedIdentity.FromJson(__jsonAksAssignedIdentity) : _aksAssignedIdentity;} + {_extensionType = If( json?.PropertyT("extensionType"), out var __jsonExtensionType) ? (string)__jsonExtensionType : (string)_extensionType;} + {_autoUpgradeMinorVersion = If( json?.PropertyT("autoUpgradeMinorVersion"), out var __jsonAutoUpgradeMinorVersion) ? (bool?)__jsonAutoUpgradeMinorVersion : _autoUpgradeMinorVersion;} + {_releaseTrain = If( json?.PropertyT("releaseTrain"), out var __jsonReleaseTrain) ? (string)__jsonReleaseTrain : (string)_releaseTrain;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : _configurationSetting;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : _configurationProtectedSetting;} + {_currentVersion = If( json?.PropertyT("currentVersion"), out var __jsonCurrentVersion) ? (string)__jsonCurrentVersion : (string)_currentVersion;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionStatus.FromJson(__u) )) ))() : null : _statuses;} + {_customLocationSetting = If( json?.PropertyT("customLocationSettings"), out var __jsonCustomLocationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettings.FromJson(__jsonCustomLocationSettings) : _customLocationSetting;} + {_packageUri = If( json?.PropertyT("packageUri"), out var __jsonPackageUri) ? (string)__jsonPackageUri : (string)_packageUri;} + {_isSystemExtension = If( json?.PropertyT("isSystemExtension"), out var __jsonIsSystemExtension) ? (bool?)__jsonIsSystemExtension : _isSystemExtension;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionProperties(json) : null; } @@ -115,7 +115,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J return container; } AddIf( null != this._scope ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._scope.ToJson(null,serializationMode) : null, "scope" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._errorInfo ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._errorInfo.ToJson(null,serializationMode) : null, "errorInfo" ,container.Add ); } @@ -126,15 +126,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); AddIf( null != this._configurationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationSetting.ToJson(null,serializationMode) : null, "configurationSettings" ,container.Add ); AddIf( null != this._configurationProtectedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationProtectedSetting.ToJson(null,serializationMode) : null, "configurationProtectedSettings" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._currentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._currentVersion.ToString()) : null, "currentVersion" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._statuses) { @@ -146,15 +146,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("statuses",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._customLocationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._customLocationSetting.ToJson(null,serializationMode) : null, "customLocationSettings" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._packageUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._packageUri.ToString()) : null, "packageUri" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._isSystemExtension ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._isSystemExtension) : null, "isSystemExtension" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs similarity index 72% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs index 175b8860c895..a441b52436cc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class ExtensionPropertiesAksAssignedIdentity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesAksAssignedIdentity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesAksAssignedIdentity(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,21 +106,21 @@ internal ExtensionPropertiesAksAssignedIdentity(global::System.Collections.IDict // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)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. @@ -135,15 +135,15 @@ internal ExtensionPropertiesAksAssignedIdentity(global::System.Management.Automa // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -156,7 +156,7 @@ internal ExtensionPropertiesAksAssignedIdentity(global::System.Management.Automa /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs index 22678475196c..7c27d93b3a91 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.cs similarity index 78% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.cs index 5d78444be22d..5ace98bba6a6 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Identity of the Extension resource in an AKS cluster public partial class ExtensionPropertiesAksAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -34,11 +34,11 @@ public partial class ExtensionPropertiesAksAssignedIdentity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? _type; + private string _type; /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Creates an new instance. public ExtensionPropertiesAksAssignedIdentity() @@ -54,6 +54,9 @@ public partial interface IExtensionPropertiesAksAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal ID of resource identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -62,6 +65,9 @@ public partial interface IExtensionPropertiesAksAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant ID of resource.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -70,10 +76,14 @@ public partial interface IExtensionPropertiesAksAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string Type { get; set; } } /// Identity of the Extension resource in an AKS cluster @@ -85,7 +95,8 @@ internal partial interface IExtensionPropertiesAksAssignedIdentityInternal /// The tenant ID of resource. string TenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string Type { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.json.cs index 494688adfab3..ac184a8381a1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesAksAssignedIdentity.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesAksAssignedIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ExtensionPropertiesAksAssignedIdentity(Microsoft.Azure.PowerShell.Cmdle { 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.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesAksAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesAksAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesAksAssignedIdentity(json) : null; } @@ -103,11 +103,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs index 84845d3f575f..75509be94c9e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,35 +65,35 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -112,7 +112,7 @@ internal ExtensionPropertiesConfigurationProtectedSettings(global::System.Collec } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,7 +138,7 @@ internal ExtensionPropertiesConfigurationProtectedSettings(global::System.Manage /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs index e7d9733a0c44..49e04afb94ef 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.cs index 3c5966bfe97c..6f739c8b2118 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// public partial class ExtensionPropertiesConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs index 9d5e17ef4623..ffaa2998aa54 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.json.cs index d08ccf9a60a4..032d2f634dc7 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationProtectedSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -74,13 +74,13 @@ internal ExtensionPropertiesConfigurationProtectedSettings(Microsoft.Azure.Power } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesConfigurationProtectedSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.PowerShell.cs index af774ee094ee..f41f4d14f0b5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class ExtensionPropertiesConfigurationSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesConfigurationSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesConfigurationSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +110,7 @@ internal ExtensionPropertiesConfigurationSettings(global::System.Collections.IDi } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +136,7 @@ internal ExtensionPropertiesConfigurationSettings(global::System.Management.Auto /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.TypeConverter.cs index 64bf9ab3817e..c0b4174723b0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.cs index 1950311be5ca..5e2d8980b1bd 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Configuration settings, as name-value pairs for configuring this extension. public partial class ExtensionPropertiesConfigurationSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.dictionary.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.dictionary.cs index db71e6beb36f..61f2b2c3b9d9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.json.cs index b23afad01c6e..6f07ba8b626d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesConfigurationSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesConfigurationSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -71,13 +71,13 @@ internal ExtensionPropertiesConfigurationSettings(Microsoft.Azure.PowerShell.Cmd } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesConfigurationSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.PowerShell.cs index c128cfa5c93b..cd37189f02d7 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class ExtensionPropertiesCustomLocationSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesCustomLocationSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesCustomLocationSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +110,7 @@ internal ExtensionPropertiesCustomLocationSettings(global::System.Collections.ID } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +136,7 @@ internal ExtensionPropertiesCustomLocationSettings(global::System.Management.Aut /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs index a99b94987e29..3aac606b1e67 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.cs similarity index 89% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.cs index ad9b3a80c6cb..b0e21f94db02 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Custom Location settings properties. public partial class ExtensionPropertiesCustomLocationSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.dictionary.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.dictionary.cs index 10f893ba2193..b8feb7a10774 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionPropertiesCustomLocationSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionPropertiesCustomLocationSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.json.cs index 55092d673942..bcc3ac4986cb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionPropertiesCustomLocationSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionPropertiesCustomLocationSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -71,13 +71,13 @@ internal ExtensionPropertiesCustomLocationSettings(Microsoft.Azure.PowerShell.Cm } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesCustomLocationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesCustomLocationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesCustomLocationSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.PowerShell.cs similarity index 69% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.PowerShell.cs index dec340177d17..c625d6513590 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class ExtensionStatus partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionStatus(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,29 +104,29 @@ internal ExtensionStatus(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("DisplayStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); } if (content.Contains("Level")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Level = (string) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Level, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -143,23 +141,23 @@ internal ExtensionStatus(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("DisplayStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); } if (content.Contains("Level")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Level = (string) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Level, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -169,7 +167,7 @@ internal ExtensionStatus(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.KubernetesConfiguration.Models.Api20221101.IExtensionStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.TypeConverter.cs index 20417e1bd458..dc24c55e68cb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.cs similarity index 85% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.cs index 4f623fadb6c6..66132a30be03 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Status from the extension. public partial class ExtensionStatus : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatusInternal { /// Backing field for property. @@ -28,11 +28,11 @@ public partial class ExtensionStatus : public string DisplayStatus { get => this._displayStatus; set => this._displayStatus = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType? _level; + private string _level; /// Level of the status. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType? Level { get => this._level; set => this._level = value; } + public string Level { get => this._level; set => this._level = value; } /// Backing field for property. private string _message; @@ -62,6 +62,9 @@ public partial interface IExtensionStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status code provided by the Extension", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -70,6 +73,9 @@ public partial interface IExtensionStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Short description of status of the extension.", SerializedName = @"displayStatus", PossibleTypes = new [] { typeof(string) })] @@ -78,14 +84,21 @@ public partial interface IExtensionStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Level of the status.", SerializedName = @"level", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType? Level { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string Level { get; set; } /// Detailed message of the status from the Extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Detailed message of the status from the Extension.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -94,6 +107,9 @@ public partial interface IExtensionStatus : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"DateLiteral (per ISO8601) noting the time of installation status.", SerializedName = @"time", PossibleTypes = new [] { typeof(string) })] @@ -109,7 +125,8 @@ internal partial interface IExtensionStatusInternal /// Short description of status of the extension. string DisplayStatus { get; set; } /// Level of the status. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType? Level { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string Level { get; set; } /// Detailed message of the status from the Extension. string Message { get; set; } /// DateLiteral (per ISO8601) noting the time of installation status. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.json.cs index 4bd29b6456d8..f72c54c0deb1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionStatus.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ExtensionStatus(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurat { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_displayStatus = If( json?.PropertyT("displayStatus"), out var __jsonDisplayStatus) ? (string)__jsonDisplayStatus : (string)DisplayStatus;} - {_level = If( json?.PropertyT("level"), out var __jsonLevel) ? (string)__jsonLevel : (string)Level;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_time = If( json?.PropertyT("time"), out var __jsonTime) ? (string)__jsonTime : (string)Time;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_displayStatus = If( json?.PropertyT("displayStatus"), out var __jsonDisplayStatus) ? (string)__jsonDisplayStatus : (string)_displayStatus;} + {_level = If( json?.PropertyT("level"), out var __jsonLevel) ? (string)__jsonLevel : (string)_level;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_time = If( json?.PropertyT("time"), out var __jsonTime) ? (string)__jsonTime : (string)_time;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionStatus(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.PowerShell.cs similarity index 75% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.PowerShell.cs index 6e589039964f..caefa37885d4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -66,35 +66,33 @@ public partial class ExtensionsList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionsList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionsList(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,17 +107,17 @@ internal ExtensionsList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,11 +132,11 @@ internal ExtensionsList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ExtensionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ExtensionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -148,7 +146,7 @@ internal ExtensionsList(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.KubernetesConfiguration.Models.Api20221101.IExtensionsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.TypeConverter.cs index ce454c03ea76..11bf15a2d0fa 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionsList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.cs similarity index 74% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.cs index 64c00f0bbd50..5b854c747129 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// results. /// public partial class ExtensionsList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsListInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -30,11 +30,11 @@ public partial class ExtensionsList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[] _value; + private System.Collections.Generic.List _value; /// List of Extensions within a Kubernetes cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public ExtensionsList() @@ -51,6 +51,9 @@ public partial interface IExtensionsList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of extension objects, if any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -59,10 +62,13 @@ public partial interface IExtensionsList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Extensions within a Kubernetes cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension) })] + System.Collections.Generic.List Value { get; } } /// Result of the request to list Extensions. It contains a list of Extension objects and a URL link to get the next set of @@ -73,7 +79,7 @@ internal partial interface IExtensionsListInternal /// URL to get the next set of extension objects, if any. string NextLink { get; set; } /// List of Extensions within a Kubernetes cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.json.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.json.cs index 902f068d49f6..9f7b781f033a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ExtensionsList.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ExtensionsList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -68,19 +68,19 @@ internal ExtensionsList(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurati { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.IExtension) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionsList(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.PowerShell.cs new file mode 100644 index 000000000000..81cb738dc66b --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.PowerShell.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The Flux Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationTypeConverter))] + public partial class FluxConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfiguration(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Scope, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FluxConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Scope, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Flux Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationTypeConverter))] + public partial interface IFluxConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.TypeConverter.cs index e43c07c73eb5..b328539e7e21 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.cs similarity index 66% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.cs index b55f25b8c279..46f2195cf8fc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.cs @@ -3,269 +3,287 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The Flux Configuration object returned in Get & Put response. public partial class FluxConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource(); /// The account key (shared key) to access the storage account [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobAccountKey = value ?? null; } + public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobAccountKey = value ?? null; } /// /// The Azure Blob container name to sync from the url endpoint for the flux configuration. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobContainerName = value ?? null; } + public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobContainerName = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobLocalAuthRef = value ?? null; } + public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobLocalAuthRef = value ?? null; } /// The Shared Access token to access the storage container [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobSasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobSasToken = value ?? null; } + public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobSasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobSasToken = value ?? null; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobSyncIntervalInSecond = value ?? default(long); } + public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobSyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobTimeoutInSecond = value ?? default(long); } + public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobTimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration Azure Blob storage account. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobUrl = value ?? null; } + public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobUrl = value ?? null; } /// Plaintext access key used to securely access the S3 bucket [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketAccessKey = value ?? null; } + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketAccessKey = value ?? null; } /// /// Specify whether to use insecure communication when puling data from the S3 bucket. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketInsecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketInsecure = value ?? default(bool); } + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketInsecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketInsecure = value ?? default(bool); } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketLocalAuthRef = value ?? null; } + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketLocalAuthRef = value ?? null; } /// The bucket name to sync from the url endpoint for the flux configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketName = value ?? null; } + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketName = value ?? null; } /// /// The interval at which to re-reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketSyncIntervalInSecond = value ?? default(long); } + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketSyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketTimeoutInSecond = value ?? default(long); } + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketTimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration S3 bucket. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).BucketUrl = value ?? null; } + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).BucketUrl = value ?? null; } /// /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ComplianceState; } + public string ComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ComplianceState; } /// Key-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Error message returned to the user in the case of provisioning failure. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ErrorMessage; } + public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ErrorMessage; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsCaCert = value ?? null; } + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsCaCert = value ?? null; } /// Plaintext HTTPS username used to access private git repositories over HTTPS [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsUser = value ?? null; } + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsUser = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryLocalAuthRef = value ?? null; } + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryLocalAuthRef = value ?? null; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositorySshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositorySshKnownHost = value ?? null; } + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositorySshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositorySshKnownHost = value ?? null; } /// /// The interval at which to re-reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositorySyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositorySyncIntervalInSecond = value ?? default(long); } + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositorySyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositorySyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryTimeoutInSecond = value ?? default(long); } + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryTimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration git repository. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryUrl = value ?? null; } + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryUrl = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id; } /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Kustomization; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Kustomization = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Kustomization; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Kustomization = value ?? null /* model class */; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ManagedIdentityClientId = value ?? null; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } + public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ManagedIdentityClientId = value ?? null; } /// Internal Acessors for AzureBlob - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.AzureBlob { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlob; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlob = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.AzureBlob { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlob; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlob = value; } /// Internal Acessors for AzureBlobManagedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobManagedIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobManagedIdentity = value; } /// Internal Acessors for AzureBlobServicePrincipal - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).AzureBlobServicePrincipal = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).AzureBlobServicePrincipal = value; } /// Internal Acessors for Bucket - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.Bucket { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Bucket; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Bucket = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.Bucket { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Bucket; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Bucket = value; } /// Internal Acessors for ComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.ComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ComplianceState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.ComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ComplianceState = value; } /// Internal Acessors for ErrorMessage - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ErrorMessage = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ErrorMessage = value; } /// Internal Acessors for GitRepository - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.GitRepository { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepository; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepository = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.GitRepository { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepository; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepository = value; } /// Internal Acessors for GitRepositoryRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).GitRepositoryRef = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).GitRepositoryRef = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for RepositoryPublicKey - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } /// Internal Acessors for SourceSyncedCommitId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.SourceSyncedCommitId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SourceSyncedCommitId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId = value; } /// Internal Acessors for SourceUpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.SourceUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SourceUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt = value; } /// Internal Acessors for StatusUpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.StatusUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.StatusUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt = value; } /// Internal Acessors for Statuses - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Statuses = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Statuses = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt = value; } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy = value; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType = value; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name; } /// /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and /// period only. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Namespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Namespace = value ?? null; } + public string Namespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Namespace = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties _property; /// Properties to create a Flux Configuration resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationProperties()); set => this._property = value; } /// Status of the creation of the fluxConfiguration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ProvisioningState; } /// /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey; } + public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey; } /// The git repository branch name to checkout. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefBranch = value ?? null; } + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefBranch = value ?? null; } /// /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefCommit = value ?? null; } + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefCommit = value ?? null; } /// /// The semver range used to match against git repository tags. This takes precedence over tag. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefSemver = value ?? null; } + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefSemver = value ?? null; } /// The git repository tag name to checkout. This takes precedence over branch. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).RepositoryRefTag = value ?? null; } + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).RepositoryRefTag = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] @@ -273,102 +291,102 @@ public partial class FluxConfiguration : /// Scope at which the operator will be installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Scope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType)""); } + public string Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Scope = value ?? null; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificate = value ?? null; } + public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificate = value ?? null; } /// The password for the certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificatePassword = value ?? null; } + public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificatePassword = value ?? null; } /// /// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based /// authentication for the Client Certificate /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } + public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } /// The client Id for authenticating a Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientId = value ?? null; } + public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientId = value ?? null; } /// The client secret for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientSecret = value ?? null; } + public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalClientSecret = value ?? null; } /// The tenant Id for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalTenantId = value ?? null; } + public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).ServicePrincipalTenantId = value ?? null; } /// Source Kind to pull the configuration data from. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceKind = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); } + public string SourceKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceKind = value ?? null; } /// Branch and/or SHA of the source commit synced with the cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string SourceSyncedCommitId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId; } + public string SourceSyncedCommitId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId; } /// Datetime the fluxConfiguration synced its source on the cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? SourceUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt; } + public global::System.DateTime? SourceUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt; } /// Datetime the fluxConfiguration synced its status on the cluster with Azure. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? StatusUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt; } + public global::System.DateTime? StatusUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt; } /// /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned /// by the fluxConfiguration. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Statuses; } + public System.Collections.Generic.List Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Statuses; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? Suspend { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Suspend; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal)Property).Suspend = value ?? default(bool); } + public bool? Suspend { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Suspend; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)Property).Suspend = value ?? default(bool); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData _systemData; /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public FluxConfiguration() @@ -384,19 +402,22 @@ public FluxConfiguration() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// The Flux Configuration object returned in Get & Put response. public partial interface IFluxConfiguration : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource { /// The account key (shared key) to access the storage account [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key (shared key) to access the storage account", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -407,6 +428,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Blob container name to sync from the url endpoint for the flux configuration.", SerializedName = @"containerName", PossibleTypes = new [] { typeof(string) })] @@ -418,6 +442,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -426,6 +453,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Shared Access token to access the storage container", SerializedName = @"sasToken", PossibleTypes = new [] { typeof(string) })] @@ -436,6 +466,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster Azure Blob source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -446,6 +479,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -454,6 +490,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration Azure Blob storage account.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -462,6 +501,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext access key used to securely access the S3 bucket", SerializedName = @"accessKey", PossibleTypes = new [] { typeof(System.Security.SecureString) })] @@ -472,6 +514,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", SerializedName = @"insecure", PossibleTypes = new [] { typeof(bool) })] @@ -483,6 +528,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -491,6 +539,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The bucket name to sync from the url endpoint for the flux configuration.", SerializedName = @"bucketName", PossibleTypes = new [] { typeof(string) })] @@ -501,6 +552,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster bucket source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -511,6 +565,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster bucket source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -519,6 +576,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration S3 bucket.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -529,22 +589,32 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects.", SerializedName = @"complianceState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Compliant", "Non-Compliant", "Pending", "Suspended", "Unknown")] + string ComplianceState { get; } /// Key-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Error message returned to the user in the case of provisioning failure. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Error message returned to the user in the case of provisioning failure.", SerializedName = @"errorMessage", PossibleTypes = new [] { typeof(string) })] @@ -555,6 +625,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", SerializedName = @"httpsCACert", PossibleTypes = new [] { typeof(string) })] @@ -563,6 +636,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", SerializedName = @"httpsUser", PossibleTypes = new [] { typeof(string) })] @@ -574,6 +650,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -584,6 +663,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", SerializedName = @"sshKnownHosts", PossibleTypes = new [] { typeof(string) })] @@ -594,6 +676,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -604,6 +689,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -612,6 +700,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration git repository.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -622,14 +713,20 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -641,6 +738,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] @@ -649,16 +749,23 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the creation of the fluxConfiguration.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; } /// /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).", SerializedName = @"repositoryPublicKey", PossibleTypes = new [] { typeof(string) })] @@ -667,6 +774,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -677,6 +787,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -687,6 +800,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -695,6 +811,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] @@ -703,14 +822,21 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"Scope at which the operator will be installed.", SerializedName = @"scope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string Scope { get; set; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -719,6 +845,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -730,6 +859,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -738,6 +870,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -746,6 +881,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -754,6 +892,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -762,14 +903,21 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// Branch and/or SHA of the source commit synced with the cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Branch and/or SHA of the source commit synced with the cluster.", SerializedName = @"sourceSyncedCommitId", PossibleTypes = new [] { typeof(string) })] @@ -778,6 +926,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Datetime the fluxConfiguration synced its source on the cluster.", SerializedName = @"sourceUpdatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -786,6 +937,9 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Datetime the fluxConfiguration synced its status on the cluster with Azure.", SerializedName = @"statusUpdatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -797,16 +951,22 @@ public partial interface IFluxConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration.", SerializedName = @"statuses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Statuses { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition) })] + System.Collections.Generic.List Statuses { get; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", SerializedName = @"suspend", PossibleTypes = new [] { typeof(bool) })] @@ -814,59 +974,79 @@ public partial interface IFluxConfiguration : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// The Flux Configuration object returned in Get & Put response. internal partial interface IFluxConfigurationInternal : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResourceInternal { /// Parameters to reconcile to the AzureBlob source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition AzureBlob { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition AzureBlob { get; set; } /// The account key (shared key) to access the storage account string AzureBlobAccountKey { get; set; } /// @@ -879,11 +1059,11 @@ internal partial interface IFluxConfigurationInternal : /// string AzureBlobLocalAuthRef { get; set; } /// Parameters to authenticate using a Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition AzureBlobManagedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition AzureBlobManagedIdentity { get; set; } /// The Shared Access token to access the storage container string AzureBlobSasToken { get; set; } /// Parameters to authenticate using Service Principal. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition AzureBlobServicePrincipal { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition AzureBlobServicePrincipal { get; set; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// @@ -895,7 +1075,7 @@ internal partial interface IFluxConfigurationInternal : /// The URL to sync for the flux configuration Azure Blob storage account. string AzureBlobUrl { get; set; } /// Parameters to reconcile to the Bucket source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition Bucket { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition Bucket { get; set; } /// Plaintext access key used to securely access the S3 bucket System.Security.SecureString BucketAccessKey { get; set; } /// @@ -922,13 +1102,14 @@ internal partial interface IFluxConfigurationInternal : /// /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Compliant", "Non-Compliant", "Pending", "Suspended", "Unknown")] + string ComplianceState { get; set; } /// Key-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Error message returned to the user in the case of provisioning failure. string ErrorMessage { get; set; } /// Parameters to reconcile to the GitRepository source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition GitRepository { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition GitRepository { get; set; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -941,7 +1122,7 @@ internal partial interface IFluxConfigurationInternal : /// string GitRepositoryLocalAuthRef { get; set; } /// The source reference for the GitRepository object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition GitRepositoryRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition GitRepositoryRef { get; set; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// @@ -959,7 +1140,7 @@ internal partial interface IFluxConfigurationInternal : /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. string ManagedIdentityClientId { get; set; } /// @@ -968,9 +1149,10 @@ internal partial interface IFluxConfigurationInternal : /// string Namespace { get; set; } /// Properties to create a Flux Configuration resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties Property { get; set; } /// Status of the creation of the fluxConfiguration. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; set; } /// /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). /// @@ -988,7 +1170,8 @@ internal partial interface IFluxConfigurationInternal : /// The git repository tag name to checkout. This takes precedence over branch. string RepositoryRefTag { get; set; } /// Scope at which the operator will be installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string Scope { get; set; } /// Base64-encoded certificate used to authenticate a Service Principal string ServicePrincipalClientCertificate { get; set; } /// The password for the certificate used to authenticate a Service Principal @@ -1005,7 +1188,8 @@ internal partial interface IFluxConfigurationInternal : /// The tenant Id for authenticating a Service Principal string ServicePrincipalTenantId { get; set; } /// Source Kind to pull the configuration data from. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// Branch and/or SHA of the source commit synced with the cluster. string SourceSyncedCommitId { get; set; } /// Datetime the fluxConfiguration synced its source on the cluster. @@ -1016,7 +1200,7 @@ internal partial interface IFluxConfigurationInternal : /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned /// by the fluxConfiguration. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Statuses { get; set; } + System.Collections.Generic.List Statuses { get; set; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// @@ -1024,19 +1208,21 @@ internal partial interface IFluxConfigurationInternal : /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.json.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.json.cs index 5a988495ed71..eff405531e8d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfiguration.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,20 +65,20 @@ internal FluxConfiguration(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigur { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfiguration(json) : null; } @@ -102,9 +102,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.PowerShell.cs new file mode 100644 index 000000000000..66e18532b2f5 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.PowerShell.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The Flux Configuration Patch Request object. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchTypeConverter))] + public partial class FluxConfigurationPatch + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationPatch(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationPatch(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationPatch(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FluxConfigurationPatch(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Flux Configuration Patch Request object. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchTypeConverter))] + public partial interface IFluxConfigurationPatch + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.TypeConverter.cs index 982d425450c8..bb8e430eef82 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.cs similarity index 70% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.cs index e8480c4fd4b1..7d38af6b6d23 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.cs @@ -3,227 +3,227 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The Flux Configuration Patch Request object. public partial class FluxConfigurationPatch : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal { /// The account key (shared key) to access the storage account [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobAccountKey = value ?? null; } + public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobAccountKey = value ?? null; } /// /// The Azure Blob container name to sync from the url endpoint for the flux configuration. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobContainerName = value ?? null; } + public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobContainerName = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobLocalAuthRef = value ?? null; } + public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobLocalAuthRef = value ?? null; } /// The Shared Access token to access the storage container [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSasToken = value ?? null; } + public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSasToken = value ?? null; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSyncIntervalInSecond = value ?? default(long); } + public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobSyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobTimeoutInSecond = value ?? default(long); } + public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobTimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration Azure Blob storage account. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobUrl = value ?? null; } + public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobUrl = value ?? null; } /// Plaintext access key used to securely access the S3 bucket [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketAccessKey = value ?? null; } + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketAccessKey = value ?? null; } /// /// Specify whether to use insecure communication when puling data from the S3 bucket. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketInsecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketInsecure = value ?? default(bool); } + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketInsecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketInsecure = value ?? default(bool); } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketLocalAuthRef = value ?? null; } + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketLocalAuthRef = value ?? null; } /// The bucket name to sync from the url endpoint for the flux configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketName = value ?? null; } + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketName = value ?? null; } /// /// The interval at which to re-reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketSyncIntervalInSecond = value ?? default(long); } + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketSyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketTimeoutInSecond = value ?? default(long); } + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketTimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration S3 bucket. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).BucketUrl = value ?? null; } + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).BucketUrl = value ?? null; } /// Key-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsCaCert = value ?? null; } + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsCaCert = value ?? null; } /// Plaintext HTTPS username used to access private git repositories over HTTPS [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsUser = value ?? null; } + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsUser = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryLocalAuthRef = value ?? null; } + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryLocalAuthRef = value ?? null; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySshKnownHost = value ?? null; } + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySshKnownHost = value ?? null; } /// /// The interval at which to re-reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySyncIntervalInSecond = value ?? default(long); } + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryTimeoutInSecond = value ?? default(long); } + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryTimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration git repository. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryUrl = value ?? null; } + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryUrl = value ?? null; } /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).Kustomization; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).Kustomization = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).Kustomization; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).Kustomization = value ?? null /* model class */; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ManagedIdentityClientId = value ?? null; } + public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ManagedIdentityClientId = value ?? null; } /// Internal Acessors for AzureBlob - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.AzureBlob { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlob; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlob = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.AzureBlob { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlob; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlob = value; } /// Internal Acessors for AzureBlobManagedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobManagedIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobManagedIdentity = value; } /// Internal Acessors for AzureBlobServicePrincipal - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobServicePrincipal = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).AzureBlobServicePrincipal = value; } /// Internal Acessors for Bucket - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.Bucket { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).Bucket; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).Bucket = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.Bucket { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).Bucket; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).Bucket = value; } /// Internal Acessors for GitRepository - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.GitRepository { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepository; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepository = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.GitRepository { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepository; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepository = value; } /// Internal Acessors for GitRepositoryRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryRef = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryRef = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties _property; /// Updatable properties of an Flux Configuration Patch Request [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchProperties()); set => this._property = value; } /// The git repository branch name to checkout. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefBranch = value ?? null; } + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefBranch = value ?? null; } /// /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefCommit = value ?? null; } + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefCommit = value ?? null; } /// /// The semver range used to match against git repository tags. This takes precedence over tag. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefSemver = value ?? null; } + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefSemver = value ?? null; } /// The git repository tag name to checkout. This takes precedence over branch. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefTag = value ?? null; } + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefTag = value ?? null; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificate = value ?? null; } + public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificate = value ?? null; } /// The password for the certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificatePassword = value ?? null; } + public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificatePassword = value ?? null; } /// /// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based /// authentication for the Client Certificate /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } + public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } /// The client Id for authenticating a Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientId = value ?? null; } + public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientId = value ?? null; } /// The client secret for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientSecret = value ?? null; } + public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalClientSecret = value ?? null; } /// The tenant Id for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalTenantId = value ?? null; } + public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).ServicePrincipalTenantId = value ?? null; } /// Source Kind to pull the configuration data from. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).SourceKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).SourceKind = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); } + public string SourceKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).SourceKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).SourceKind = value ?? null; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? Suspend { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).Suspend; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal)Property).Suspend = value ?? default(bool); } + public bool? Suspend { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).Suspend; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)Property).Suspend = value ?? default(bool); } /// Creates an new instance. public FluxConfigurationPatch() @@ -239,6 +239,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key (shared key) to access the storage account", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -249,6 +252,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Blob container name to sync from the url endpoint for the flux configuration.", SerializedName = @"containerName", PossibleTypes = new [] { typeof(string) })] @@ -260,6 +266,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -268,6 +277,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Shared Access token to access the storage container", SerializedName = @"sasToken", PossibleTypes = new [] { typeof(string) })] @@ -278,6 +290,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster Azure Blob source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -288,6 +303,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -296,6 +314,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration Azure Blob storage account.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -304,6 +325,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext access key used to securely access the S3 bucket", SerializedName = @"accessKey", PossibleTypes = new [] { typeof(System.Security.SecureString) })] @@ -314,6 +338,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", SerializedName = @"insecure", PossibleTypes = new [] { typeof(bool) })] @@ -325,6 +352,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -333,6 +363,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The bucket name to sync from the url endpoint for the flux configuration.", SerializedName = @"bucketName", PossibleTypes = new [] { typeof(string) })] @@ -343,6 +376,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster bucket source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -353,6 +389,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster bucket source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -361,6 +400,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration S3 bucket.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -369,16 +411,22 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", SerializedName = @"httpsCACert", PossibleTypes = new [] { typeof(string) })] @@ -387,6 +435,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", SerializedName = @"httpsUser", PossibleTypes = new [] { typeof(string) })] @@ -398,6 +449,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -408,6 +462,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", SerializedName = @"sshKnownHosts", PossibleTypes = new [] { typeof(string) })] @@ -418,6 +475,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -428,6 +488,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -436,6 +499,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration git repository.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -446,14 +512,20 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -462,6 +534,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -472,6 +547,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -482,6 +560,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -490,6 +571,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] @@ -498,6 +582,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -506,6 +593,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -517,6 +607,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -525,6 +618,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -533,6 +629,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -541,6 +640,9 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -549,16 +651,23 @@ public partial interface IFluxConfigurationPatch : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", SerializedName = @"suspend", PossibleTypes = new [] { typeof(bool) })] @@ -570,7 +679,7 @@ internal partial interface IFluxConfigurationPatchInternal { /// Parameters to reconcile to the AzureBlob source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition AzureBlob { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition AzureBlob { get; set; } /// The account key (shared key) to access the storage account string AzureBlobAccountKey { get; set; } /// @@ -583,11 +692,11 @@ internal partial interface IFluxConfigurationPatchInternal /// string AzureBlobLocalAuthRef { get; set; } /// Parameters to authenticate using a Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition AzureBlobManagedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition AzureBlobManagedIdentity { get; set; } /// The Shared Access token to access the storage container string AzureBlobSasToken { get; set; } /// Parameters to authenticate using Service Principal. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition AzureBlobServicePrincipal { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition AzureBlobServicePrincipal { get; set; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// @@ -599,7 +708,7 @@ internal partial interface IFluxConfigurationPatchInternal /// The URL to sync for the flux configuration Azure Blob storage account. string AzureBlobUrl { get; set; } /// Parameters to reconcile to the Bucket source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition Bucket { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition Bucket { get; set; } /// Plaintext access key used to securely access the S3 bucket System.Security.SecureString BucketAccessKey { get; set; } /// @@ -624,9 +733,9 @@ internal partial interface IFluxConfigurationPatchInternal /// The URL to sync for the flux configuration S3 bucket. string BucketUrl { get; set; } /// Key-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Parameters to reconcile to the GitRepository source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition GitRepository { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition GitRepository { get; set; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -639,7 +748,7 @@ internal partial interface IFluxConfigurationPatchInternal /// string GitRepositoryLocalAuthRef { get; set; } /// The source reference for the GitRepository object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition GitRepositoryRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition GitRepositoryRef { get; set; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// @@ -657,11 +766,11 @@ internal partial interface IFluxConfigurationPatchInternal /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. string ManagedIdentityClientId { get; set; } /// Updatable properties of an Flux Configuration Patch Request - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties Property { get; set; } /// The git repository branch name to checkout. string RepositoryRefBranch { get; set; } /// @@ -690,7 +799,8 @@ internal partial interface IFluxConfigurationPatchInternal /// The tenant Id for authenticating a Service Principal string ServicePrincipalTenantId { get; set; } /// Source Kind to pull the configuration data from. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.json.cs index 17a60ceb271c..0771ecc61bb0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatch.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatch.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,18 +65,18 @@ internal FluxConfigurationPatch(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCon { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatch(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.PowerShell.cs new file mode 100644 index 000000000000..458c90bef67f --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.PowerShell.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Updatable properties of an Flux Configuration Patch Request + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesTypeConverter))] + public partial class FluxConfigurationPatchProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationPatchProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationPatchProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationPatchProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FluxConfigurationPatchProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Updatable properties of an Flux Configuration Patch Request + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesTypeConverter))] + public partial interface IFluxConfigurationPatchProperties + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.TypeConverter.cs index d7d16e043e4a..3ca89a88e0f6 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.cs similarity index 72% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.cs index 9c2efeb4b4aa..f0d0a48f9c3c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.cs @@ -3,241 +3,241 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Updatable properties of an Flux Configuration Patch Request public partial class FluxConfigurationPatchProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition _azureBlob; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition _azureBlob; /// Parameters to reconcile to the AzureBlob source kind type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinition()); set => this._azureBlob = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinition()); set => this._azureBlob = value; } /// The account key (shared key) to access the storage account [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).AccountKey = value ?? null; } + public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).AccountKey = value ?? null; } /// /// The Azure Blob container name to sync from the url endpoint for the flux configuration. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ContainerName = value ?? null; } + public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ContainerName = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).LocalAuthRef = value ?? null; } + public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).LocalAuthRef = value ?? null; } /// The Shared Access token to access the storage container [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).SasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).SasToken = value ?? null; } + public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).SasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).SasToken = value ?? null; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).SyncIntervalInSecond = value ?? default(long); } + public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).SyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).TimeoutInSecond = value ?? default(long); } + public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).TimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration Azure Blob storage account. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).Url = value ?? null; } + public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).Url = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition _bucket; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition _bucket; /// Parameters to reconcile to the Bucket source kind type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinition()); set => this._bucket = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinition()); set => this._bucket = value; } /// Plaintext access key used to securely access the S3 bucket [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).AccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).AccessKey = value ?? null; } + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).AccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).AccessKey = value ?? null; } /// /// Specify whether to use insecure communication when puling data from the S3 bucket. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).Insecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).Insecure = value ?? default(bool); } + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).Insecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).Insecure = value ?? default(bool); } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).LocalAuthRef = value ?? null; } + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).LocalAuthRef = value ?? null; } /// The bucket name to sync from the url endpoint for the flux configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).BucketName = value ?? null; } + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).BucketName = value ?? null; } /// /// The interval at which to re-reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).SyncIntervalInSecond = value ?? default(long); } + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).SyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).TimeoutInSecond = value ?? default(long); } + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).TimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration S3 bucket. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinitionInternal)Bucket).Url = value ?? null; } + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinitionInternal)Bucket).Url = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings _configurationProtectedSetting; /// Key-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition _gitRepository; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition _gitRepository; /// Parameters to reconcile to the GitRepository source kind type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinition()); set => this._gitRepository = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinition()); set => this._gitRepository = value; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsCaCert = value ?? null; } + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsCaCert = value ?? null; } /// Plaintext HTTPS username used to access private git repositories over HTTPS [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsUser = value ?? null; } + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsUser = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).LocalAuthRef = value ?? null; } + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).LocalAuthRef = value ?? null; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).SshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).SshKnownHost = value ?? null; } + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).SshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).SshKnownHost = value ?? null; } /// /// The interval at which to re-reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).SyncIntervalInSecond = value ?? default(long); } + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).SyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).TimeoutInSecond = value ?? default(long); } + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).TimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration git repository. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).Url = value ?? null; } + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).Url = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations _kustomization; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations _kustomization; /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => (this._kustomization = this._kustomization ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizations()); set => this._kustomization = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => (this._kustomization = this._kustomization ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizations()); set => this._kustomization = value; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentityClientId = value ?? null; } + public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentityClientId = value ?? null; } /// Internal Acessors for AzureBlob - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal.AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinition()); set { {_azureBlob = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal.AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinition()); set { {_azureBlob = value;} } } /// Internal Acessors for AzureBlobManagedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ManagedIdentity = value; } /// Internal Acessors for AzureBlobServicePrincipal - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipal = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipal = value; } /// Internal Acessors for Bucket - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal.Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinition()); set { {_bucket = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal.Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinition()); set { {_bucket = value;} } } /// Internal Acessors for GitRepository - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal.GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinition()); set { {_gitRepository = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal.GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinition()); set { {_gitRepository = value;} } } /// Internal Acessors for GitRepositoryRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRef = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRef = value; } /// The git repository branch name to checkout. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefBranch = value ?? null; } + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefBranch = value ?? null; } /// /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefCommit = value ?? null; } + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefCommit = value ?? null; } /// /// The semver range used to match against git repository tags. This takes precedence over tag. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefSemver = value ?? null; } + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefSemver = value ?? null; } /// The git repository tag name to checkout. This takes precedence over branch. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefTag = value ?? null; } + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefTag = value ?? null; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate = value ?? null; } + public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate = value ?? null; } /// The password for the certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword = value ?? null; } + public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword = value ?? null; } /// /// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based /// authentication for the Client Certificate /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } + public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } /// The client Id for authenticating a Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientId = value ?? null; } + public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientId = value ?? null; } /// The client secret for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientSecret = value ?? null; } + public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalClientSecret = value ?? null; } /// The tenant Id for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalTenantId = value ?? null; } + public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinitionInternal)AzureBlob).ServicePrincipalTenantId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? _sourceKind; + private string _sourceKind; /// Source Kind to pull the configuration data from. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => this._sourceKind; set => this._sourceKind = value; } + public string SourceKind { get => this._sourceKind; set => this._sourceKind = value; } /// Backing field for property. private bool? _suspend; @@ -262,6 +262,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key (shared key) to access the storage account", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -272,6 +275,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Blob container name to sync from the url endpoint for the flux configuration.", SerializedName = @"containerName", PossibleTypes = new [] { typeof(string) })] @@ -283,6 +289,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -291,6 +300,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Shared Access token to access the storage container", SerializedName = @"sasToken", PossibleTypes = new [] { typeof(string) })] @@ -301,6 +313,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster Azure Blob source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -311,6 +326,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -319,6 +337,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration Azure Blob storage account.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -327,6 +348,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext access key used to securely access the S3 bucket", SerializedName = @"accessKey", PossibleTypes = new [] { typeof(System.Security.SecureString) })] @@ -337,6 +361,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", SerializedName = @"insecure", PossibleTypes = new [] { typeof(bool) })] @@ -348,6 +375,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -356,6 +386,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The bucket name to sync from the url endpoint for the flux configuration.", SerializedName = @"bucketName", PossibleTypes = new [] { typeof(string) })] @@ -366,6 +399,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster bucket source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -376,6 +412,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster bucket source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -384,6 +423,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration S3 bucket.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -392,16 +434,22 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", SerializedName = @"httpsCACert", PossibleTypes = new [] { typeof(string) })] @@ -410,6 +458,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", SerializedName = @"httpsUser", PossibleTypes = new [] { typeof(string) })] @@ -421,6 +472,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -431,6 +485,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", SerializedName = @"sshKnownHosts", PossibleTypes = new [] { typeof(string) })] @@ -441,6 +498,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -451,6 +511,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -459,6 +522,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration git repository.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -469,14 +535,20 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -485,6 +557,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -495,6 +570,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -505,6 +583,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -513,6 +594,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] @@ -521,6 +605,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -529,6 +616,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -540,6 +630,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -548,6 +641,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -556,6 +652,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -564,6 +663,9 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -572,16 +674,23 @@ public partial interface IFluxConfigurationPatchProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", SerializedName = @"suspend", PossibleTypes = new [] { typeof(bool) })] @@ -593,7 +702,7 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal { /// Parameters to reconcile to the AzureBlob source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobPatchDefinition AzureBlob { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobPatchDefinition AzureBlob { get; set; } /// The account key (shared key) to access the storage account string AzureBlobAccountKey { get; set; } /// @@ -606,11 +715,11 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal /// string AzureBlobLocalAuthRef { get; set; } /// Parameters to authenticate using a Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition AzureBlobManagedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition AzureBlobManagedIdentity { get; set; } /// The Shared Access token to access the storage container string AzureBlobSasToken { get; set; } /// Parameters to authenticate using Service Principal. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition AzureBlobServicePrincipal { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition AzureBlobServicePrincipal { get; set; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// @@ -622,7 +731,7 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal /// The URL to sync for the flux configuration Azure Blob storage account. string AzureBlobUrl { get; set; } /// Parameters to reconcile to the Bucket source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketPatchDefinition Bucket { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketPatchDefinition Bucket { get; set; } /// Plaintext access key used to securely access the S3 bucket System.Security.SecureString BucketAccessKey { get; set; } /// @@ -647,9 +756,9 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal /// The URL to sync for the flux configuration S3 bucket. string BucketUrl { get; set; } /// Key-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Parameters to reconcile to the GitRepository source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition GitRepository { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition GitRepository { get; set; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -662,7 +771,7 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal /// string GitRepositoryLocalAuthRef { get; set; } /// The source reference for the GitRepository object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition GitRepositoryRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition GitRepositoryRef { get; set; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// @@ -680,7 +789,7 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. string ManagedIdentityClientId { get; set; } /// The git repository branch name to checkout. @@ -711,7 +820,8 @@ internal partial interface IFluxConfigurationPatchPropertiesInternal /// The tenant Id for authenticating a Service Principal string ServicePrincipalTenantId { get; set; } /// Source Kind to pull the configuration data from. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.json.cs similarity index 89% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.json.cs index 16177ada0d89..debfdb9a0e5a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,24 +65,24 @@ internal FluxConfigurationPatchProperties(Microsoft.Azure.PowerShell.Cmdlets.Kub { return; } - {_gitRepository = If( json?.PropertyT("gitRepository"), out var __jsonGitRepository) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryPatchDefinition.FromJson(__jsonGitRepository) : GitRepository;} - {_bucket = If( json?.PropertyT("bucket"), out var __jsonBucket) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketPatchDefinition.FromJson(__jsonBucket) : Bucket;} - {_azureBlob = If( json?.PropertyT("azureBlob"), out var __jsonAzureBlob) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobPatchDefinition.FromJson(__jsonAzureBlob) : AzureBlob;} - {_sourceKind = If( json?.PropertyT("sourceKind"), out var __jsonSourceKind) ? (string)__jsonSourceKind : (string)SourceKind;} - {_suspend = If( json?.PropertyT("suspend"), out var __jsonSuspend) ? (bool?)__jsonSuspend : Suspend;} - {_kustomization = If( json?.PropertyT("kustomizations"), out var __jsonKustomizations) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizations.FromJson(__jsonKustomizations) : Kustomization;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_gitRepository = If( json?.PropertyT("gitRepository"), out var __jsonGitRepository) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryPatchDefinition.FromJson(__jsonGitRepository) : _gitRepository;} + {_bucket = If( json?.PropertyT("bucket"), out var __jsonBucket) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketPatchDefinition.FromJson(__jsonBucket) : _bucket;} + {_azureBlob = If( json?.PropertyT("azureBlob"), out var __jsonAzureBlob) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobPatchDefinition.FromJson(__jsonAzureBlob) : _azureBlob;} + {_sourceKind = If( json?.PropertyT("sourceKind"), out var __jsonSourceKind) ? (string)__jsonSourceKind : (string)_sourceKind;} + {_suspend = If( json?.PropertyT("suspend"), out var __jsonSuspend) ? (bool?)__jsonSuspend : _suspend;} + {_kustomization = If( json?.PropertyT("kustomizations"), out var __jsonKustomizations) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizations.FromJson(__jsonKustomizations) : _kustomization;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : _configurationProtectedSetting;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatchProperties(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 86% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs index 6cf115ca4cfb..329e0f7518fd 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSetti partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FluxConfigurationPatchPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FluxConfigurationPatchPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +110,7 @@ internal FluxConfigurationPatchPropertiesConfigurationProtectedSettings(global:: } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +136,7 @@ internal FluxConfigurationPatchPropertiesConfigurationProtectedSettings(global:: /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs index 1bfba6c8679f..08498e7fbbf6 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs similarity index 88% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs index 8d8503c97f55..f797ee01c1fb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Key-value pairs of protected configuration settings for the configuration public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs index eb30341ba61f..f3c37ffec985 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs index 857c084cbafc..822fbdb7edb5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -72,13 +72,13 @@ internal FluxConfigurationPatchPropertiesConfigurationProtectedSettings(Microsof } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatchPropertiesConfigurationProtectedSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs index 892219df841a..c8370f9560d4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,35 +65,35 @@ public partial class FluxConfigurationPatchPropertiesKustomizations partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FluxConfigurationPatchPropertiesKustomizations(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FluxConfigurationPatchPropertiesKustomizations(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -112,7 +112,7 @@ internal FluxConfigurationPatchPropertiesKustomizations(global::System.Collectio } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,7 +138,7 @@ internal FluxConfigurationPatchPropertiesKustomizations(global::System.Managemen /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs index 61eeda9f6eba..bb479c26d79a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.cs index 591bde5f8038..f8bc164c1f56 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// public partial class FluxConfigurationPatchPropertiesKustomizations : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizationsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizationsInternal { /// @@ -26,7 +26,7 @@ public FluxConfigurationPatchPropertiesKustomizations() /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. public partial interface IFluxConfigurationPatchPropertiesKustomizations : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray { } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs similarity index 65% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs index 435280e71dc4..625d175d00f5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; public partial class FluxConfigurationPatchPropertiesKustomizations : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatchPropertiesKustomizations source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatchPropertiesKustomizations source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.json.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.json.cs index 150cfc11b9cb..ae753422dfb8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPatchPropertiesKustomizations.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPatchPropertiesKustomizations.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -69,18 +69,18 @@ internal FluxConfigurationPatchPropertiesKustomizations(Microsoft.Azure.PowerShe { return; } - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.KustomizationPatchDefinition.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KustomizationPatchDefinition.FromJson(j) ,exclusions ); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatchPropertiesKustomizations(json) : null; } @@ -106,7 +106,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.PowerShell.cs new file mode 100644 index 000000000000..7afc23f691fe --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.PowerShell.cs @@ -0,0 +1,574 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties to create a Flux Configuration resource + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesTypeConverter))] + public partial class FluxConfigurationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Scope, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FluxConfigurationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlob")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlob = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition) content.GetValueForProperty("AzureBlob",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlob, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Scope, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceKind = (string) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceKind, global::System.Convert.ToString); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Statuses = (System.Collections.Generic.List) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobServicePrincipal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition) content.GetValueForProperty("AzureBlobServicePrincipal",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobServicePrincipal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ServicePrincipalDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobManagedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition) content.GetValueForProperty("AzureBlobManagedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobManagedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ManagedIdentityDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("AzureBlobUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl = (string) content.GetValueForProperty("AzureBlobUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobUrl, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName = (string) content.GetValueForProperty("AzureBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond = (long?) content.GetValueForProperty("AzureBlobTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond = (long?) content.GetValueForProperty("AzureBlobSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AzureBlobAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey = (string) content.GetValueForProperty("AzureBlobAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobAccountKey, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobSasToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken = (string) content.GetValueForProperty("AzureBlobSasToken",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobSasToken, global::System.Convert.ToString); + } + if (content.Contains("AzureBlobLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef = (string) content.GetValueForProperty("AzureBlobLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).AzureBlobLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId = (string) content.GetValueForProperty("ServicePrincipalClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId = (string) content.GetValueForProperty("ServicePrincipalTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalTenantId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret = (string) content.GetValueForProperty("ServicePrincipalClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientSecret, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate = (string) content.GetValueForProperty("ServicePrincipalClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificate, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificatePassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword = (string) content.GetValueForProperty("ServicePrincipalClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificatePassword, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalClientCertificateSendChain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain = (bool?) content.GetValueForProperty("ServicePrincipalClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ServicePrincipalClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ManagedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId = (string) content.GetValueForProperty("ManagedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal)this).ManagedIdentityClientId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties to create a Flux Configuration resource + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesTypeConverter))] + public partial interface IFluxConfigurationProperties + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.TypeConverter.cs index 0e80636d2ef0..d61d9104d7a4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.cs index 95c6fda41948..aebb75aef30d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.cs @@ -3,119 +3,119 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties to create a Flux Configuration resource public partial class FluxConfigurationProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition _azureBlob; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition _azureBlob; /// Parameters to reconcile to the AzureBlob source kind type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinition()); set => this._azureBlob = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinition()); set => this._azureBlob = value; } /// The account key (shared key) to access the storage account [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).AccountKey = value ?? null; } + public string AzureBlobAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).AccountKey = value ?? null; } /// /// The Azure Blob container name to sync from the url endpoint for the flux configuration. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ContainerName = value ?? null; } + public string AzureBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ContainerName = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).LocalAuthRef = value ?? null; } + public string AzureBlobLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).LocalAuthRef = value ?? null; } /// The Shared Access token to access the storage container [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).SasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).SasToken = value ?? null; } + public string AzureBlobSasToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).SasToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).SasToken = value ?? null; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).SyncIntervalInSecond = value ?? default(long); } + public long? AzureBlobSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).SyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).TimeoutInSecond = value ?? default(long); } + public long? AzureBlobTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).TimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration Azure Blob storage account. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).Url = value ?? null; } + public string AzureBlobUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).Url = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition _bucket; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition _bucket; /// Parameters to reconcile to the Bucket source kind type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinition()); set => this._bucket = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinition()); set => this._bucket = value; } /// Plaintext access key used to securely access the S3 bucket [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).AccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).AccessKey = value ?? null; } + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).AccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).AccessKey = value ?? null; } /// /// Specify whether to use insecure communication when puling data from the S3 bucket. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).Insecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).Insecure = value ?? default(bool); } + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).Insecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).Insecure = value ?? default(bool); } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).LocalAuthRef = value ?? null; } + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).LocalAuthRef = value ?? null; } /// The bucket name to sync from the url endpoint for the flux configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).BucketName = value ?? null; } + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).BucketName = value ?? null; } /// /// The interval at which to re-reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).SyncIntervalInSecond = value ?? default(long); } + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).SyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster bucket source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).TimeoutInSecond = value ?? default(long); } + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).TimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration S3 bucket. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinitionInternal)Bucket).Url = value ?? null; } + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinitionInternal)Bucket).Url = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? _complianceState; + private string _complianceState; /// /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get => this._complianceState; } + public string ComplianceState { get => this._complianceState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings _configurationProtectedSetting; /// Key-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. private string _errorMessage; @@ -125,105 +125,105 @@ public partial class FluxConfigurationProperties : public string ErrorMessage { get => this._errorMessage; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition _gitRepository; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition _gitRepository; /// Parameters to reconcile to the GitRepository source kind type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinition()); set => this._gitRepository = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinition()); set => this._gitRepository = value; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).HttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).HttpsCaCert = value ?? null; } + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).HttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).HttpsCaCert = value ?? null; } /// Plaintext HTTPS username used to access private git repositories over HTTPS [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).HttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).HttpsUser = value ?? null; } + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).HttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).HttpsUser = value ?? null; } /// /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided /// configuration secrets. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).LocalAuthRef = value ?? null; } + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).LocalAuthRef = value ?? null; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).SshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).SshKnownHost = value ?? null; } + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).SshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).SshKnownHost = value ?? null; } /// /// The interval at which to re-reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).SyncIntervalInSecond = value ?? default(long); } + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).SyncIntervalInSecond = value ?? default(long); } /// /// The maximum time to attempt to reconcile the cluster git repository source with the remote. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).TimeoutInSecond = value ?? default(long); } + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).TimeoutInSecond = value ?? default(long); } /// The URL to sync for the flux configuration git repository. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).Url = value ?? null; } + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).Url = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations _kustomization; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations _kustomization; /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get => (this._kustomization = this._kustomization ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizations()); set => this._kustomization = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get => (this._kustomization = this._kustomization ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizations()); set => this._kustomization = value; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentityClientId = value ?? null; } + public string ManagedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentityClientId = value ?? null; } /// Internal Acessors for AzureBlob - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinition()); set { {_azureBlob = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.AzureBlob { get => (this._azureBlob = this._azureBlob ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinition()); set { {_azureBlob = value;} } } /// Internal Acessors for AzureBlobManagedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.AzureBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ManagedIdentity = value; } /// Internal Acessors for AzureBlobServicePrincipal - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipal = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.AzureBlobServicePrincipal { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipal; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipal = value; } /// Internal Acessors for Bucket - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinition()); set { {_bucket = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinition()); set { {_bucket = value;} } } /// Internal Acessors for ComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } /// Internal Acessors for ErrorMessage - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.ErrorMessage { get => this._errorMessage; set { {_errorMessage = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.ErrorMessage { get => this._errorMessage; set { {_errorMessage = value;} } } /// Internal Acessors for GitRepository - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinition()); set { {_gitRepository = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinition()); set { {_gitRepository = value;} } } /// Internal Acessors for GitRepositoryRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRef = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRef = value; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for RepositoryPublicKey - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } /// Internal Acessors for SourceSyncedCommitId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.SourceSyncedCommitId { get => this._sourceSyncedCommitId; set { {_sourceSyncedCommitId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.SourceSyncedCommitId { get => this._sourceSyncedCommitId; set { {_sourceSyncedCommitId = value;} } } /// Internal Acessors for SourceUpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.SourceUpdatedAt { get => this._sourceUpdatedAt; set { {_sourceUpdatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.SourceUpdatedAt { get => this._sourceUpdatedAt; set { {_sourceUpdatedAt = value;} } } /// Internal Acessors for StatusUpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.StatusUpdatedAt { get => this._statusUpdatedAt; set { {_statusUpdatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.StatusUpdatedAt { get => this._statusUpdatedAt; set { {_statusUpdatedAt = value;} } } /// Internal Acessors for Statuses - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } /// Backing field for property. private string _namespace; @@ -236,11 +236,11 @@ public partial class FluxConfigurationProperties : public string Namespace { get => this._namespace; set => this._namespace = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? _provisioningState; + private string _provisioningState; /// Status of the creation of the fluxConfiguration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _repositoryPublicKey; @@ -253,64 +253,64 @@ public partial class FluxConfigurationProperties : /// The git repository branch name to checkout. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefBranch = value ?? null; } + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefBranch = value ?? null; } /// /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefCommit = value ?? null; } + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefCommit = value ?? null; } /// /// The semver range used to match against git repository tags. This takes precedence over tag. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefSemver = value ?? null; } + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefSemver = value ?? null; } /// The git repository tag name to checkout. This takes precedence over branch. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefTag = value ?? null; } + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefTag = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? _scope; + private string _scope; /// Scope at which the operator will be installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get => this._scope; set => this._scope = value; } + public string Scope { get => this._scope; set => this._scope = value; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate = value ?? null; } + public string ServicePrincipalClientCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificate = value ?? null; } /// The password for the certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword = value ?? null; } + public string ServicePrincipalClientCertificatePassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificatePassword = value ?? null; } /// /// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based /// authentication for the Client Certificate /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } + public bool? ServicePrincipalClientCertificateSendChain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientCertificateSendChain = value ?? default(bool); } /// The client Id for authenticating a Service Principal. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientId = value ?? null; } + public string ServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientId = value ?? null; } /// The client secret for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientSecret = value ?? null; } + public string ServicePrincipalClientSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalClientSecret = value ?? null; } /// The tenant Id for authenticating a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalTenantId = value ?? null; } + public string ServicePrincipalTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinitionInternal)AzureBlob).ServicePrincipalTenantId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? _sourceKind; + private string _sourceKind; /// Source Kind to pull the configuration data from. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => this._sourceKind; set => this._sourceKind = value; } + public string SourceKind { get => this._sourceKind; set => this._sourceKind = value; } /// Backing field for property. private string _sourceSyncedCommitId; @@ -334,14 +334,14 @@ public partial class FluxConfigurationProperties : public global::System.DateTime? StatusUpdatedAt { get => this._statusUpdatedAt; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] _statuses; + private System.Collections.Generic.List _statuses; /// /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned /// by the fluxConfiguration. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Statuses { get => this._statuses; } + public System.Collections.Generic.List Statuses { get => this._statuses; } /// Backing field for property. private bool? _suspend; @@ -366,6 +366,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key (shared key) to access the storage account", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -376,6 +379,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Blob container name to sync from the url endpoint for the flux configuration.", SerializedName = @"containerName", PossibleTypes = new [] { typeof(string) })] @@ -387,6 +393,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -395,6 +404,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Shared Access token to access the storage container", SerializedName = @"sasToken", PossibleTypes = new [] { typeof(string) })] @@ -405,6 +417,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster Azure Blob source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -415,6 +430,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -423,6 +441,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration Azure Blob storage account.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -431,6 +452,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext access key used to securely access the S3 bucket", SerializedName = @"accessKey", PossibleTypes = new [] { typeof(System.Security.SecureString) })] @@ -441,6 +465,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", SerializedName = @"insecure", PossibleTypes = new [] { typeof(bool) })] @@ -452,6 +479,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -460,6 +490,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The bucket name to sync from the url endpoint for the flux configuration.", SerializedName = @"bucketName", PossibleTypes = new [] { typeof(string) })] @@ -470,6 +503,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster bucket source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -480,6 +516,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster bucket source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -488,6 +527,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration S3 bucket.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -498,22 +540,32 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects.", SerializedName = @"complianceState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Compliant", "Non-Compliant", "Pending", "Suspended", "Unknown")] + string ComplianceState { get; } /// Key-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Error message returned to the user in the case of provisioning failure. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Error message returned to the user in the case of provisioning failure.", SerializedName = @"errorMessage", PossibleTypes = new [] { typeof(string) })] @@ -524,6 +576,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", SerializedName = @"httpsCACert", PossibleTypes = new [] { typeof(string) })] @@ -532,6 +587,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", SerializedName = @"httpsUser", PossibleTypes = new [] { typeof(string) })] @@ -543,6 +601,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -553,6 +614,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", SerializedName = @"sshKnownHosts", PossibleTypes = new [] { typeof(string) })] @@ -563,6 +627,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -573,6 +640,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -581,6 +651,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration git repository.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -591,14 +664,20 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -610,6 +689,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] @@ -618,16 +700,23 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the creation of the fluxConfiguration.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; } /// /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).", SerializedName = @"repositoryPublicKey", PossibleTypes = new [] { typeof(string) })] @@ -636,6 +725,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -646,6 +738,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -656,6 +751,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -664,6 +762,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] @@ -672,14 +773,21 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"Scope at which the operator will be installed.", SerializedName = @"scope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string Scope { get; set; } /// Base64-encoded certificate used to authenticate a Service Principal [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -688,6 +796,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -699,6 +810,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -707,6 +821,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -715,6 +832,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -723,6 +843,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -731,14 +854,21 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// Branch and/or SHA of the source commit synced with the cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Branch and/or SHA of the source commit synced with the cluster.", SerializedName = @"sourceSyncedCommitId", PossibleTypes = new [] { typeof(string) })] @@ -747,6 +877,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Datetime the fluxConfiguration synced its source on the cluster.", SerializedName = @"sourceUpdatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -755,6 +888,9 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Datetime the fluxConfiguration synced its status on the cluster with Azure.", SerializedName = @"statusUpdatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -766,16 +902,22 @@ public partial interface IFluxConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration.", SerializedName = @"statuses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Statuses { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition) })] + System.Collections.Generic.List Statuses { get; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", SerializedName = @"suspend", PossibleTypes = new [] { typeof(bool) })] @@ -787,7 +929,7 @@ internal partial interface IFluxConfigurationPropertiesInternal { /// Parameters to reconcile to the AzureBlob source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IAzureBlobDefinition AzureBlob { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAzureBlobDefinition AzureBlob { get; set; } /// The account key (shared key) to access the storage account string AzureBlobAccountKey { get; set; } /// @@ -800,11 +942,11 @@ internal partial interface IFluxConfigurationPropertiesInternal /// string AzureBlobLocalAuthRef { get; set; } /// Parameters to authenticate using a Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition AzureBlobManagedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition AzureBlobManagedIdentity { get; set; } /// The Shared Access token to access the storage container string AzureBlobSasToken { get; set; } /// Parameters to authenticate using Service Principal. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition AzureBlobServicePrincipal { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition AzureBlobServicePrincipal { get; set; } /// /// The interval at which to re-reconcile the cluster Azure Blob source with the remote. /// @@ -816,7 +958,7 @@ internal partial interface IFluxConfigurationPropertiesInternal /// The URL to sync for the flux configuration Azure Blob storage account. string AzureBlobUrl { get; set; } /// Parameters to reconcile to the Bucket source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IBucketDefinition Bucket { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IBucketDefinition Bucket { get; set; } /// Plaintext access key used to securely access the S3 bucket System.Security.SecureString BucketAccessKey { get; set; } /// @@ -843,13 +985,14 @@ internal partial interface IFluxConfigurationPropertiesInternal /// /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Compliant", "Non-Compliant", "Pending", "Suspended", "Unknown")] + string ComplianceState { get; set; } /// Key-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Error message returned to the user in the case of provisioning failure. string ErrorMessage { get; set; } /// Parameters to reconcile to the GitRepository source kind type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition GitRepository { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition GitRepository { get; set; } /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -862,7 +1005,7 @@ internal partial interface IFluxConfigurationPropertiesInternal /// string GitRepositoryLocalAuthRef { get; set; } /// The source reference for the GitRepository object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition GitRepositoryRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition GitRepositoryRef { get; set; } /// /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH /// @@ -880,7 +1023,7 @@ internal partial interface IFluxConfigurationPropertiesInternal /// /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } /// The client Id for authenticating a Managed Identity. string ManagedIdentityClientId { get; set; } /// @@ -889,7 +1032,8 @@ internal partial interface IFluxConfigurationPropertiesInternal /// string Namespace { get; set; } /// Status of the creation of the fluxConfiguration. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting")] + string ProvisioningState { get; set; } /// /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). /// @@ -907,7 +1051,8 @@ internal partial interface IFluxConfigurationPropertiesInternal /// The git repository tag name to checkout. This takes precedence over branch. string RepositoryRefTag { get; set; } /// Scope at which the operator will be installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string Scope { get; set; } /// Base64-encoded certificate used to authenticate a Service Principal string ServicePrincipalClientCertificate { get; set; } /// The password for the certificate used to authenticate a Service Principal @@ -924,7 +1069,8 @@ internal partial interface IFluxConfigurationPropertiesInternal /// The tenant Id for authenticating a Service Principal string ServicePrincipalTenantId { get; set; } /// Source Kind to pull the configuration data from. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + string SourceKind { get; set; } /// Branch and/or SHA of the source commit synced with the cluster. string SourceSyncedCommitId { get; set; } /// Datetime the fluxConfiguration synced its source on the cluster. @@ -935,7 +1081,7 @@ internal partial interface IFluxConfigurationPropertiesInternal /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned /// by the fluxConfiguration. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition[] Statuses { get; set; } + System.Collections.Generic.List Statuses { get; set; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.json.cs similarity index 83% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.json.cs index c7d3ed9ad104..55f096ae19dd 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -65,34 +65,34 @@ internal FluxConfigurationProperties(Microsoft.Azure.PowerShell.Cmdlets.Kubernet { return; } - {_gitRepository = If( json?.PropertyT("gitRepository"), out var __jsonGitRepository) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.GitRepositoryDefinition.FromJson(__jsonGitRepository) : GitRepository;} - {_bucket = If( json?.PropertyT("bucket"), out var __jsonBucket) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.BucketDefinition.FromJson(__jsonBucket) : Bucket;} - {_azureBlob = If( json?.PropertyT("azureBlob"), out var __jsonAzureBlob) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.AzureBlobDefinition.FromJson(__jsonAzureBlob) : AzureBlob;} - {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope;} - {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} - {_sourceKind = If( json?.PropertyT("sourceKind"), out var __jsonSourceKind) ? (string)__jsonSourceKind : (string)SourceKind;} - {_suspend = If( json?.PropertyT("suspend"), out var __jsonSuspend) ? (bool?)__jsonSuspend : Suspend;} - {_kustomization = If( json?.PropertyT("kustomizations"), out var __jsonKustomizations) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizations.FromJson(__jsonKustomizations) : Kustomization;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} - {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusDefinition.FromJson(__u) )) ))() : null : Statuses;} - {_repositoryPublicKey = If( json?.PropertyT("repositoryPublicKey"), out var __jsonRepositoryPublicKey) ? (string)__jsonRepositoryPublicKey : (string)RepositoryPublicKey;} - {_sourceSyncedCommitId = If( json?.PropertyT("sourceSyncedCommitId"), out var __jsonSourceSyncedCommitId) ? (string)__jsonSourceSyncedCommitId : (string)SourceSyncedCommitId;} - {_sourceUpdatedAt = If( json?.PropertyT("sourceUpdatedAt"), out var __jsonSourceUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonSourceUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonSourceUpdatedAtValue) ? __jsonSourceUpdatedAtValue : SourceUpdatedAt : SourceUpdatedAt;} - {_statusUpdatedAt = If( json?.PropertyT("statusUpdatedAt"), out var __jsonStatusUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonStatusUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStatusUpdatedAtValue) ? __jsonStatusUpdatedAtValue : StatusUpdatedAt : StatusUpdatedAt;} - {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)ComplianceState;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_errorMessage = If( json?.PropertyT("errorMessage"), out var __jsonErrorMessage) ? (string)__jsonErrorMessage : (string)ErrorMessage;} + {_gitRepository = If( json?.PropertyT("gitRepository"), out var __jsonGitRepository) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.GitRepositoryDefinition.FromJson(__jsonGitRepository) : _gitRepository;} + {_bucket = If( json?.PropertyT("bucket"), out var __jsonBucket) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.BucketDefinition.FromJson(__jsonBucket) : _bucket;} + {_azureBlob = If( json?.PropertyT("azureBlob"), out var __jsonAzureBlob) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AzureBlobDefinition.FromJson(__jsonAzureBlob) : _azureBlob;} + {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)_scope;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)_namespace;} + {_sourceKind = If( json?.PropertyT("sourceKind"), out var __jsonSourceKind) ? (string)__jsonSourceKind : (string)_sourceKind;} + {_suspend = If( json?.PropertyT("suspend"), out var __jsonSuspend) ? (bool?)__jsonSuspend : _suspend;} + {_kustomization = If( json?.PropertyT("kustomizations"), out var __jsonKustomizations) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizations.FromJson(__jsonKustomizations) : _kustomization;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : _configurationProtectedSetting;} + {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusDefinition.FromJson(__u) )) ))() : null : _statuses;} + {_repositoryPublicKey = If( json?.PropertyT("repositoryPublicKey"), out var __jsonRepositoryPublicKey) ? (string)__jsonRepositoryPublicKey : (string)_repositoryPublicKey;} + {_sourceSyncedCommitId = If( json?.PropertyT("sourceSyncedCommitId"), out var __jsonSourceSyncedCommitId) ? (string)__jsonSourceSyncedCommitId : (string)_sourceSyncedCommitId;} + {_sourceUpdatedAt = If( json?.PropertyT("sourceUpdatedAt"), out var __jsonSourceUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonSourceUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonSourceUpdatedAtValue) ? __jsonSourceUpdatedAtValue : _sourceUpdatedAt : _sourceUpdatedAt;} + {_statusUpdatedAt = If( json?.PropertyT("statusUpdatedAt"), out var __jsonStatusUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonStatusUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStatusUpdatedAtValue) ? __jsonStatusUpdatedAtValue : _statusUpdatedAt : _statusUpdatedAt;} + {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)_complianceState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_errorMessage = If( json?.PropertyT("errorMessage"), out var __jsonErrorMessage) ? (string)__jsonErrorMessage : (string)_errorMessage;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationProperties(json) : null; } @@ -119,13 +119,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J AddIf( null != this._gitRepository ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._gitRepository.ToJson(null,serializationMode) : null, "gitRepository" ,container.Add ); AddIf( null != this._bucket ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._bucket.ToJson(null,serializationMode) : null, "bucket" ,container.Add ); AddIf( null != this._azureBlob ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._azureBlob.ToJson(null,serializationMode) : null, "azureBlob" ,container.Add ); - AddIf( null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope" ,container.Add ); - AddIf( null != (((object)this._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + } AddIf( null != (((object)this._sourceKind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceKind.ToString()) : null, "sourceKind" ,container.Add ); AddIf( null != this._suspend ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._suspend) : null, "suspend" ,container.Add ); AddIf( null != this._kustomization ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._kustomization.ToJson(null,serializationMode) : null, "kustomizations" ,container.Add ); AddIf( null != this._configurationProtectedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationProtectedSetting.ToJson(null,serializationMode) : null, "configurationProtectedSettings" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._statuses) { @@ -137,31 +143,31 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("statuses",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._repositoryPublicKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._repositoryPublicKey.ToString()) : null, "repositoryPublicKey" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._sourceSyncedCommitId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceSyncedCommitId.ToString()) : null, "sourceSyncedCommitId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._sourceUpdatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceUpdatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "sourceUpdatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._statusUpdatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._statusUpdatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "statusUpdatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._complianceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._complianceState.ToString()) : null, "complianceState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._errorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._errorMessage.ToString()) : null, "errorMessage" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 86% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs index 3799e37fb1d8..d87e80852078 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class FluxConfigurationPropertiesConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FluxConfigurationPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FluxConfigurationPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +110,7 @@ internal FluxConfigurationPropertiesConfigurationProtectedSettings(global::Syste } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +136,7 @@ internal FluxConfigurationPropertiesConfigurationProtectedSettings(global::Syste /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs index f520e891a921..921ef4b22873 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.cs similarity index 89% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.cs index 6bb37a4e3179..86d35e692885 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Key-value pairs of protected configuration settings for the configuration public partial class FluxConfigurationPropertiesConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs index c4b6e7a166f8..68639afc13ea 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs index 9e5423742584..1886fb38fb63 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -72,13 +72,13 @@ internal FluxConfigurationPropertiesConfigurationProtectedSettings(Microsoft.Azu } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPropertiesConfigurationProtectedSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.PowerShell.cs index bf63ecbe3d59..d08c072fb86d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,35 +65,35 @@ public partial class FluxConfigurationPropertiesKustomizations partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FluxConfigurationPropertiesKustomizations(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FluxConfigurationPropertiesKustomizations(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -112,7 +112,7 @@ internal FluxConfigurationPropertiesKustomizations(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. @@ -138,7 +138,7 @@ internal FluxConfigurationPropertiesKustomizations(global::System.Management.Aut /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.TypeConverter.cs index f704dc6ce6de..b9c8cbe78fb3 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.cs index b3c2f040379b..674cb3d29b8e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. /// public partial class FluxConfigurationPropertiesKustomizations : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizationsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizationsInternal { /// @@ -26,7 +26,7 @@ public FluxConfigurationPropertiesKustomizations() /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. public partial interface IFluxConfigurationPropertiesKustomizations : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray { } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.dictionary.cs similarity index 65% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.dictionary.cs index e035f9ad9ea3..f529f7e2d041 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; public partial class FluxConfigurationPropertiesKustomizations : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPropertiesKustomizations source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPropertiesKustomizations source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.json.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.json.cs index 578b549f4c41..11b3680d450d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationPropertiesKustomizations.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationPropertiesKustomizations.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -68,18 +68,18 @@ internal FluxConfigurationPropertiesKustomizations(Microsoft.Azure.PowerShell.Cm { return; } - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.KustomizationDefinition.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.KustomizationDefinition.FromJson(j) ,exclusions ); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPropertiesKustomizations(json) : null; } @@ -105,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.PowerShell.cs similarity index 74% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.PowerShell.cs index ccb3d8ac1eb4..87ff4d6a60f1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -66,35 +66,33 @@ public partial class FluxConfigurationsList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FluxConfigurationsList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FluxConfigurationsList(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,17 +107,17 @@ internal FluxConfigurationsList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,11 +132,11 @@ internal FluxConfigurationsList(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -148,7 +146,7 @@ internal FluxConfigurationsList(global::System.Management.Automation.PSObject co /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.TypeConverter.cs index 81843fa7d15c..8af12ebc136d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.cs index bdd8913839fc..41abbb4cee4f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// the next set of results. /// public partial class FluxConfigurationsList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsListInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -30,11 +30,11 @@ public partial class FluxConfigurationsList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[] _value; + private System.Collections.Generic.List _value; /// List of Flux Configurations within a Kubernetes cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public FluxConfigurationsList() @@ -51,6 +51,9 @@ public partial interface IFluxConfigurationsList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of configuration objects, if any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -59,10 +62,13 @@ public partial interface IFluxConfigurationsList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Flux Configurations within a Kubernetes cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration) })] + System.Collections.Generic.List Value { get; } } /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get @@ -73,7 +79,7 @@ internal partial interface IFluxConfigurationsListInternal /// URL to get the next set of configuration objects, if any. string NextLink { get; set; } /// List of Flux Configurations within a Kubernetes cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.json.cs index 1a7cd3038282..df3134e64e9e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/FluxConfigurationsList.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/FluxConfigurationsList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -68,19 +68,19 @@ internal FluxConfigurationsList(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCon { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.IFluxConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationsList(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.PowerShell.cs similarity index 55% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.PowerShell.cs index c6e80dd5044d..5835876eef5a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class GitRepositoryDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GitRepositoryDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GitRepositoryDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,57 +113,57 @@ internal GitRepositoryDefinition(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("RepositoryRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); } if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SshKnownHost")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); } if (content.Contains("HttpsUser")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); } if (content.Contains("HttpsCaCert")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); } if (content.Contains("RepositoryRefBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); } if (content.Contains("RepositoryRefTag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); } if (content.Contains("RepositoryRefSemver")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); } if (content.Contains("RepositoryRefCommit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit, 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. @@ -178,51 +178,51 @@ internal GitRepositoryDefinition(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("RepositoryRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); } if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SshKnownHost")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); } if (content.Contains("HttpsUser")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); } if (content.Contains("HttpsCaCert")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); } if (content.Contains("RepositoryRefBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); } if (content.Contains("RepositoryRefTag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); } if (content.Contains("RepositoryRefSemver")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); } if (content.Contains("RepositoryRefCommit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.TypeConverter.cs index 8ad11a226e57..b2c9f9210908 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.cs similarity index 85% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.cs index 3f12add701b5..ba037cc8792c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to reconcile to the GitRepository source kind type. public partial class GitRepositoryDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal { /// Backing field for property. @@ -40,34 +40,34 @@ public partial class GitRepositoryDefinition : public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } /// Internal Acessors for RepositoryRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinitionInternal.RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition()); set { {_repositoryRef = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinitionInternal.RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition()); set { {_repositoryRef = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition _repositoryRef; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition _repositoryRef; /// The source reference for the GitRepository object. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition()); set => this._repositoryRef = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition()); set => this._repositoryRef = value; } /// The git repository branch name to checkout. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Branch = value ?? null; } + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Branch = value ?? null; } /// /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Commit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Commit = value ?? null; } + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Commit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Commit = value ?? null; } /// /// The semver range used to match against git repository tags. This takes precedence over tag. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Semver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Semver = value ?? null; } + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Semver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Semver = value ?? null; } /// The git repository tag name to checkout. This takes precedence over branch. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Tag = value ?? null; } + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Tag = value ?? null; } /// Backing field for property. private string _sshKnownHost; @@ -119,6 +119,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", SerializedName = @"httpsCACert", PossibleTypes = new [] { typeof(string) })] @@ -127,6 +130,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", SerializedName = @"httpsUser", PossibleTypes = new [] { typeof(string) })] @@ -138,6 +144,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +155,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -156,6 +168,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -166,6 +181,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -174,6 +192,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] @@ -184,6 +205,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", SerializedName = @"sshKnownHosts", PossibleTypes = new [] { typeof(string) })] @@ -194,6 +218,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -204,6 +231,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -212,6 +242,9 @@ public partial interface IGitRepositoryDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration git repository.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -234,7 +267,7 @@ internal partial interface IGitRepositoryDefinitionInternal /// string LocalAuthRef { get; set; } /// The source reference for the GitRepository object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition RepositoryRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition RepositoryRef { get; set; } /// The git repository branch name to checkout. string RepositoryRefBranch { get; set; } /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.json.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.json.cs index f432e4988a8e..aa1961be7731 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class GitRepositoryDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new GitRepositoryDefinition(json) : null; } @@ -77,14 +77,14 @@ internal GitRepositoryDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCo { return; } - {_repositoryRef = If( json?.PropertyT("repositoryRef"), out var __jsonRepositoryRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition.FromJson(__jsonRepositoryRef) : RepositoryRef;} - {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_sshKnownHost = If( json?.PropertyT("sshKnownHosts"), out var __jsonSshKnownHosts) ? (string)__jsonSshKnownHosts : (string)SshKnownHost;} - {_httpsUser = If( json?.PropertyT("httpsUser"), out var __jsonHttpsUser) ? (string)__jsonHttpsUser : (string)HttpsUser;} - {_httpsCaCert = If( json?.PropertyT("httpsCACert"), out var __jsonHttpsCaCert) ? (string)__jsonHttpsCaCert : (string)HttpsCaCert;} - {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + {_repositoryRef = If( json?.PropertyT("repositoryRef"), out var __jsonRepositoryRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition.FromJson(__jsonRepositoryRef) : _repositoryRef;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)_url;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_sshKnownHost = If( json?.PropertyT("sshKnownHosts"), out var __jsonSshKnownHosts) ? (string)__jsonSshKnownHosts : (string)_sshKnownHost;} + {_httpsUser = If( json?.PropertyT("httpsUser"), out var __jsonHttpsUser) ? (string)__jsonHttpsUser : (string)_httpsUser;} + {_httpsCaCert = If( json?.PropertyT("httpsCACert"), out var __jsonHttpsCaCert) ? (string)__jsonHttpsCaCert : (string)_httpsCaCert;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)_localAuthRef;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.PowerShell.cs similarity index 55% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.PowerShell.cs index 48b14566890d..64ea45068e5e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class GitRepositoryPatchDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GitRepositoryPatchDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GitRepositoryPatchDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,57 +113,57 @@ internal GitRepositoryPatchDefinition(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("RepositoryRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); } if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SshKnownHost")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); } if (content.Contains("HttpsUser")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); } if (content.Contains("HttpsCaCert")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); } if (content.Contains("RepositoryRefBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); } if (content.Contains("RepositoryRefTag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); } if (content.Contains("RepositoryRefSemver")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); } if (content.Contains("RepositoryRefCommit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit, 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. @@ -178,51 +178,51 @@ internal GitRepositoryPatchDefinition(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("RepositoryRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinitionTypeConverter.ConvertFrom); } if (content.Contains("Url")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).Url, global::System.Convert.ToString); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SshKnownHost")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); } if (content.Contains("HttpsUser")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); } if (content.Contains("HttpsCaCert")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); } if (content.Contains("LocalAuthRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); } if (content.Contains("RepositoryRefBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); } if (content.Contains("RepositoryRefTag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); } if (content.Contains("RepositoryRefSemver")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); } if (content.Contains("RepositoryRefCommit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.TypeConverter.cs index 7773b5b08b1e..0f5bb411a202 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.cs similarity index 85% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.cs index d7bbdd356890..64bd36864d61 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to reconcile to the GitRepository source kind type. public partial class GitRepositoryPatchDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal { /// Backing field for property. @@ -40,34 +40,34 @@ public partial class GitRepositoryPatchDefinition : public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } /// Internal Acessors for RepositoryRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinitionInternal.RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition()); set { {_repositoryRef = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinitionInternal.RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition()); set { {_repositoryRef = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition _repositoryRef; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition _repositoryRef; /// The source reference for the GitRepository object. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition()); set => this._repositoryRef = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition()); set => this._repositoryRef = value; } /// The git repository branch name to checkout. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Branch = value ?? null; } + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Branch = value ?? null; } /// /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Commit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Commit = value ?? null; } + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Commit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Commit = value ?? null; } /// /// The semver range used to match against git repository tags. This takes precedence over tag. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Semver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Semver = value ?? null; } + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Semver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Semver = value ?? null; } /// The git repository tag name to checkout. This takes precedence over branch. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)RepositoryRef).Tag = value ?? null; } + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)RepositoryRef).Tag = value ?? null; } /// Backing field for property. private string _sshKnownHost; @@ -119,6 +119,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", SerializedName = @"httpsCACert", PossibleTypes = new [] { typeof(string) })] @@ -127,6 +130,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", SerializedName = @"httpsUser", PossibleTypes = new [] { typeof(string) })] @@ -138,6 +144,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", SerializedName = @"localAuthRef", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +155,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -156,6 +168,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -166,6 +181,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -174,6 +192,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] @@ -184,6 +205,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", SerializedName = @"sshKnownHosts", PossibleTypes = new [] { typeof(string) })] @@ -194,6 +218,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -204,6 +231,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -212,6 +242,9 @@ public partial interface IGitRepositoryPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The URL to sync for the flux configuration git repository.", SerializedName = @"url", PossibleTypes = new [] { typeof(string) })] @@ -234,7 +267,7 @@ internal partial interface IGitRepositoryPatchDefinitionInternal /// string LocalAuthRef { get; set; } /// The source reference for the GitRepository object. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition RepositoryRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition RepositoryRef { get; set; } /// The git repository branch name to checkout. string RepositoryRefBranch { get; set; } /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.json.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.json.cs index dc424fbeb52c..a9df4ee55dc1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/GitRepositoryPatchDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/GitRepositoryPatchDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class GitRepositoryPatchDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IGitRepositoryPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IGitRepositoryPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new GitRepositoryPatchDefinition(json) : null; } @@ -77,14 +77,14 @@ internal GitRepositoryPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kuberne { return; } - {_repositoryRef = If( json?.PropertyT("repositoryRef"), out var __jsonRepositoryRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.RepositoryRefDefinition.FromJson(__jsonRepositoryRef) : RepositoryRef;} - {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_sshKnownHost = If( json?.PropertyT("sshKnownHosts"), out var __jsonSshKnownHosts) ? (string)__jsonSshKnownHosts : (string)SshKnownHost;} - {_httpsUser = If( json?.PropertyT("httpsUser"), out var __jsonHttpsUser) ? (string)__jsonHttpsUser : (string)HttpsUser;} - {_httpsCaCert = If( json?.PropertyT("httpsCACert"), out var __jsonHttpsCaCert) ? (string)__jsonHttpsCaCert : (string)HttpsCaCert;} - {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + {_repositoryRef = If( json?.PropertyT("repositoryRef"), out var __jsonRepositoryRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.RepositoryRefDefinition.FromJson(__jsonRepositoryRef) : _repositoryRef;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)_url;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_sshKnownHost = If( json?.PropertyT("sshKnownHosts"), out var __jsonSshKnownHosts) ? (string)__jsonSshKnownHosts : (string)_sshKnownHost;} + {_httpsUser = If( json?.PropertyT("httpsUser"), out var __jsonHttpsUser) ? (string)__jsonHttpsUser : (string)_httpsUser;} + {_httpsCaCert = If( json?.PropertyT("httpsCACert"), out var __jsonHttpsCaCert) ? (string)__jsonHttpsCaCert : (string)_httpsCaCert;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)_localAuthRef;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.PowerShell.cs similarity index 78% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.PowerShell.cs index d1a7b9fd6b32..37bc56d5352a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class HelmOperatorProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HelmOperatorProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HelmOperatorProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal HelmOperatorProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ChartVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); } if (content.Contains("ChartValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal HelmOperatorProperties(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("ChartVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); } if (content.Contains("ChartValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.TypeConverter.cs index a52469cc2990..a3354174b35a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.cs index e606693846b2..c46b858d9250 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties for Helm operator. public partial class HelmOperatorProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface IHelmOperatorProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Values override for the operator Helm chart.", SerializedName = @"chartValues", PossibleTypes = new [] { typeof(string) })] @@ -49,6 +52,9 @@ public partial interface IHelmOperatorProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the operator Helm chart.", SerializedName = @"chartVersion", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.json.cs index 7b815685db5d..26f98cf44389 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmOperatorProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmOperatorProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HelmOperatorProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new HelmOperatorProperties(json) : null; } @@ -77,8 +77,8 @@ internal HelmOperatorProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCon { return; } - {_chartVersion = If( json?.PropertyT("chartVersion"), out var __jsonChartVersion) ? (string)__jsonChartVersion : (string)ChartVersion;} - {_chartValue = If( json?.PropertyT("chartValues"), out var __jsonChartValues) ? (string)__jsonChartValues : (string)ChartValue;} + {_chartVersion = If( json?.PropertyT("chartVersion"), out var __jsonChartVersion) ? (string)__jsonChartVersion : (string)_chartVersion;} + {_chartValue = If( json?.PropertyT("chartValues"), out var __jsonChartValues) ? (string)__jsonChartValues : (string)_chartValue;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.PowerShell.cs similarity index 60% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.PowerShell.cs index 7d329bd21aa5..5faaaac8a655 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class HelmReleasePropertiesDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HelmReleasePropertiesDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HelmReleasePropertiesDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,37 +113,37 @@ internal HelmReleasePropertiesDefinition(global::System.Collections.IDictionary // actually deserialize if (content.Contains("HelmChartRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition) content.GetValueForProperty("HelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition) content.GetValueForProperty("HelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinitionTypeConverter.ConvertFrom); } if (content.Contains("LastRevisionApplied")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied = (long?) content.GetValueForProperty("LastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied = (long?) content.GetValueForProperty("LastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("FailureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).FailureCount = (long?) content.GetValueForProperty("FailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).FailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).FailureCount = (long?) content.GetValueForProperty("FailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).FailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("InstallFailureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount = (long?) content.GetValueForProperty("InstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount = (long?) content.GetValueForProperty("InstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("UpgradeFailureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount = (long?) content.GetValueForProperty("UpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount = (long?) content.GetValueForProperty("UpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("HelmChartRefName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); } if (content.Contains("HelmChartRefNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace, 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. @@ -158,31 +158,31 @@ internal HelmReleasePropertiesDefinition(global::System.Management.Automation.PS // actually deserialize if (content.Contains("HelmChartRef")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition) content.GetValueForProperty("HelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition) content.GetValueForProperty("HelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinitionTypeConverter.ConvertFrom); } if (content.Contains("LastRevisionApplied")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied = (long?) content.GetValueForProperty("LastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied = (long?) content.GetValueForProperty("LastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("FailureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).FailureCount = (long?) content.GetValueForProperty("FailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).FailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).FailureCount = (long?) content.GetValueForProperty("FailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).FailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("InstallFailureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount = (long?) content.GetValueForProperty("InstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount = (long?) content.GetValueForProperty("InstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("UpgradeFailureCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount = (long?) content.GetValueForProperty("UpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount = (long?) content.GetValueForProperty("UpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("HelmChartRefName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); } if (content.Contains("HelmChartRefNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.TypeConverter.cs index b79bed26cace..a784a48f52d9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.cs similarity index 81% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.cs index 571b81d4a9ab..7cfcd129514b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties for HelmRelease objects public partial class HelmReleasePropertiesDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal { /// Backing field for property. @@ -21,19 +21,19 @@ public partial class HelmReleasePropertiesDefinition : public long? FailureCount { get => this._failureCount; set => this._failureCount = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition _helmChartRef; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition _helmChartRef; /// The reference to the HelmChart object used as the source to this HelmRelease [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition HelmChartRef { get => (this._helmChartRef = this._helmChartRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition()); set => this._helmChartRef = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition HelmChartRef { get => (this._helmChartRef = this._helmChartRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition()); set => this._helmChartRef = value; } /// Name of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmChartRefName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)HelmChartRef).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)HelmChartRef).Name = value ?? null; } + public string HelmChartRefName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)HelmChartRef).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)HelmChartRef).Name = value ?? null; } /// Namespace of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmChartRefNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)HelmChartRef).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)HelmChartRef).Namespace = value ?? null; } + public string HelmChartRefNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)HelmChartRef).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)HelmChartRef).Namespace = value ?? null; } /// Backing field for property. private long? _installFailureCount; @@ -50,7 +50,7 @@ public partial class HelmReleasePropertiesDefinition : public long? LastRevisionApplied { get => this._lastRevisionApplied; set => this._lastRevisionApplied = value; } /// Internal Acessors for HelmChartRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal.HelmChartRef { get => (this._helmChartRef = this._helmChartRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition()); set { {_helmChartRef = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal.HelmChartRef { get => (this._helmChartRef = this._helmChartRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition()); set { {_helmChartRef = value;} } } /// Backing field for property. private long? _upgradeFailureCount; @@ -73,6 +73,9 @@ public partial interface IHelmReleasePropertiesDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Total number of times that the HelmRelease failed to install or upgrade", SerializedName = @"failureCount", PossibleTypes = new [] { typeof(long) })] @@ -81,6 +84,9 @@ public partial interface IHelmReleasePropertiesDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the object", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -89,6 +95,9 @@ public partial interface IHelmReleasePropertiesDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace of the object", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] @@ -97,6 +106,9 @@ public partial interface IHelmReleasePropertiesDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of times that the HelmRelease failed to install", SerializedName = @"installFailureCount", PossibleTypes = new [] { typeof(long) })] @@ -105,6 +117,9 @@ public partial interface IHelmReleasePropertiesDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The revision number of the last released object change", SerializedName = @"lastRevisionApplied", PossibleTypes = new [] { typeof(long) })] @@ -113,6 +128,9 @@ public partial interface IHelmReleasePropertiesDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of times that the HelmRelease failed to upgrade", SerializedName = @"upgradeFailureCount", PossibleTypes = new [] { typeof(long) })] @@ -126,7 +144,7 @@ internal partial interface IHelmReleasePropertiesDefinitionInternal /// Total number of times that the HelmRelease failed to install or upgrade long? FailureCount { get; set; } /// The reference to the HelmChart object used as the source to this HelmRelease - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition HelmChartRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition HelmChartRef { get; set; } /// Name of the object string HelmChartRefName { get; set; } /// Namespace of the object diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.json.cs similarity index 92% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.json.cs index 1e6ccb5ad249..e1e6f90af382 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/HelmReleasePropertiesDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/HelmReleasePropertiesDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HelmReleasePropertiesDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new HelmReleasePropertiesDefinition(json) : null; } @@ -77,11 +77,11 @@ internal HelmReleasePropertiesDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kube { return; } - {_helmChartRef = If( json?.PropertyT("helmChartRef"), out var __jsonHelmChartRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition.FromJson(__jsonHelmChartRef) : HelmChartRef;} - {_lastRevisionApplied = If( json?.PropertyT("lastRevisionApplied"), out var __jsonLastRevisionApplied) ? (long?)__jsonLastRevisionApplied : LastRevisionApplied;} - {_failureCount = If( json?.PropertyT("failureCount"), out var __jsonFailureCount) ? (long?)__jsonFailureCount : FailureCount;} - {_installFailureCount = If( json?.PropertyT("installFailureCount"), out var __jsonInstallFailureCount) ? (long?)__jsonInstallFailureCount : InstallFailureCount;} - {_upgradeFailureCount = If( json?.PropertyT("upgradeFailureCount"), out var __jsonUpgradeFailureCount) ? (long?)__jsonUpgradeFailureCount : UpgradeFailureCount;} + {_helmChartRef = If( json?.PropertyT("helmChartRef"), out var __jsonHelmChartRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition.FromJson(__jsonHelmChartRef) : _helmChartRef;} + {_lastRevisionApplied = If( json?.PropertyT("lastRevisionApplied"), out var __jsonLastRevisionApplied) ? (long?)__jsonLastRevisionApplied : _lastRevisionApplied;} + {_failureCount = If( json?.PropertyT("failureCount"), out var __jsonFailureCount) ? (long?)__jsonFailureCount : _failureCount;} + {_installFailureCount = If( json?.PropertyT("installFailureCount"), out var __jsonInstallFailureCount) ? (long?)__jsonInstallFailureCount : _installFailureCount;} + {_upgradeFailureCount = If( json?.PropertyT("upgradeFailureCount"), out var __jsonUpgradeFailureCount) ? (long?)__jsonUpgradeFailureCount : _upgradeFailureCount;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.PowerShell.cs similarity index 76% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.PowerShell.cs index 57059bfca876..e4aaf532b300 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Identity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Identity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Identity(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,21 +111,21 @@ internal Identity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)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. @@ -140,15 +140,15 @@ internal Identity(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.TypeConverter.cs index 1cfbd7eb0a2e..a22cf4189cd8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.cs similarity index 79% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.cs index e9f353a2d14d..c00d04f762c3 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Identity for the resource. public partial class Identity : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -34,11 +34,11 @@ public partial class Identity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? _type; + private string _type; /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Creates an new instance. public Identity() @@ -54,6 +54,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal ID of resource identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -62,6 +65,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The tenant ID of resource.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -70,10 +76,14 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned")] + string Type { get; set; } } /// Identity for the resource. @@ -85,7 +95,8 @@ internal partial interface IIdentityInternal /// The tenant ID of resource. string TenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned")] + string Type { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.json.cs index cf168390b4f5..46fd7030b1cc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Identity.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Identity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Identity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Identity(json) : null; } @@ -77,9 +77,9 @@ internal Identity(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Run { 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); } @@ -102,11 +102,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.cs index 9a02e7e30f98..60391b5fe319 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.cs @@ -99,6 +99,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the kubernetes cluster.", SerializedName = @"clusterName", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +112,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] @@ -119,6 +125,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] @@ -127,6 +136,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Extension.", SerializedName = @"extensionName", PossibleTypes = new [] { typeof(string) })] @@ -135,6 +147,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Flux Configuration.", SerializedName = @"fluxConfigurationName", PossibleTypes = new [] { typeof(string) })] @@ -143,6 +158,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -151,6 +169,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"operation Id", SerializedName = @"operationId", PossibleTypes = new [] { typeof(string) })] @@ -159,6 +180,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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) })] @@ -167,6 +191,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Source Control Configuration.", SerializedName = @"sourceControlConfigurationName", PossibleTypes = new [] { typeof(string) })] @@ -175,6 +202,9 @@ public partial interface IKubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.json.cs index cdb74aaf18d0..36862d0f0ed0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KubernetesConfigurationIdentity.json.cs @@ -76,16 +76,16 @@ internal KubernetesConfigurationIdentity(Microsoft.Azure.PowerShell.Cmdlets.Kube { 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;} - {_clusterRp = If( json?.PropertyT("clusterRp"), out var __jsonClusterRp) ? (string)__jsonClusterRp : (string)ClusterRp;} - {_clusterResourceName = If( json?.PropertyT("clusterResourceName"), out var __jsonClusterResourceName) ? (string)__jsonClusterResourceName : (string)ClusterResourceName;} - {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} - {_extensionName = If( json?.PropertyT("extensionName"), out var __jsonExtensionName) ? (string)__jsonExtensionName : (string)ExtensionName;} - {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} - {_fluxConfigurationName = If( json?.PropertyT("fluxConfigurationName"), out var __jsonFluxConfigurationName) ? (string)__jsonFluxConfigurationName : (string)FluxConfigurationName;} - {_sourceControlConfigurationName = If( json?.PropertyT("sourceControlConfigurationName"), out var __jsonSourceControlConfigurationName) ? (string)__jsonSourceControlConfigurationName : (string)SourceControlConfigurationName;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_clusterRp = If( json?.PropertyT("clusterRp"), out var __jsonClusterRp) ? (string)__jsonClusterRp : (string)_clusterRp;} + {_clusterResourceName = If( json?.PropertyT("clusterResourceName"), out var __jsonClusterResourceName) ? (string)__jsonClusterResourceName : (string)_clusterResourceName;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)_clusterName;} + {_extensionName = If( json?.PropertyT("extensionName"), out var __jsonExtensionName) ? (string)__jsonExtensionName : (string)_extensionName;} + {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)_operationId;} + {_fluxConfigurationName = If( json?.PropertyT("fluxConfigurationName"), out var __jsonFluxConfigurationName) ? (string)__jsonFluxConfigurationName : (string)_fluxConfigurationName;} + {_sourceControlConfigurationName = If( json?.PropertyT("sourceControlConfigurationName"), out var __jsonSourceControlConfigurationName) ? (string)__jsonSourceControlConfigurationName : (string)_sourceControlConfigurationName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.PowerShell.cs similarity index 61% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.PowerShell.cs index b48a950eedfc..daf70b875f34 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,29 +65,29 @@ public partial class KustomizationDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new KustomizationDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new KustomizationDefinition(content); } @@ -97,10 +97,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,41 +115,41 @@ internal KustomizationDefinition(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("DependsOn")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).DependsOn = (System.Collections.Generic.List) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RetryIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Prune")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Force")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Force, (__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. @@ -164,35 +164,35 @@ internal KustomizationDefinition(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("DependsOn")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).DependsOn = (System.Collections.Generic.List) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RetryIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Prune")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Force")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.TypeConverter.cs index 4950b84a0800..65653f8a0a1a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.cs index 5204e5c9786f..37133bb4f1f1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,19 +11,19 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. /// public partial class KustomizationDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal { /// Backing field for property. - private string[] _dependsOn; + private System.Collections.Generic.List _dependsOn; /// /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies /// have completed their reconciliation. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string[] DependsOn { get => this._dependsOn; set => this._dependsOn = value; } + public System.Collections.Generic.List DependsOn { get => this._dependsOn; set => this._dependsOn = value; } /// Backing field for property. private bool? _force; @@ -35,7 +35,7 @@ public partial class KustomizationDefinition : public bool? Force { get => this._force; set => this._force = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinitionInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinitionInternal.Name { get => this._name; set { {_name = value;} } } /// Backing field for property. private string _name; @@ -100,16 +100,22 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation.", SerializedName = @"dependsOn", PossibleTypes = new [] { typeof(string) })] - string[] DependsOn { get; set; } + System.Collections.Generic.List DependsOn { get; set; } /// /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change.", SerializedName = @"force", PossibleTypes = new [] { typeof(bool) })] @@ -118,6 +124,9 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the Kustomization, matching the key in the Kustomizations object map.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -126,6 +135,9 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The path in the source reference to reconcile on the cluster.", SerializedName = @"path", PossibleTypes = new [] { typeof(string) })] @@ -136,6 +148,9 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable/disable garbage collections of Kubernetes objects created by this Kustomization.", SerializedName = @"prune", PossibleTypes = new [] { typeof(bool) })] @@ -146,6 +161,9 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation.", SerializedName = @"retryIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -154,6 +172,9 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the Kustomization on the cluster.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -162,6 +183,9 @@ public partial interface IKustomizationDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the Kustomization on the cluster.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -176,7 +200,7 @@ internal partial interface IKustomizationDefinitionInternal /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies /// have completed their reconciliation. /// - string[] DependsOn { get; set; } + System.Collections.Generic.List DependsOn { get; set; } /// /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.json.cs index 7f1b3c34412f..f0d14a88dda9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class KustomizationDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new KustomizationDefinition(json) : null; } @@ -79,14 +79,14 @@ internal KustomizationDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCo { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} - {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DependsOn;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_retryIntervalInSecond = If( json?.PropertyT("retryIntervalInSeconds"), out var __jsonRetryIntervalInSeconds) ? (long?)__jsonRetryIntervalInSeconds : RetryIntervalInSecond;} - {_prune = If( json?.PropertyT("prune"), out var __jsonPrune) ? (bool?)__jsonPrune : Prune;} - {_force = If( json?.PropertyT("force"), out var __jsonForce) ? (bool?)__jsonForce : Force;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)_path;} + {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _dependsOn;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_retryIntervalInSecond = If( json?.PropertyT("retryIntervalInSeconds"), out var __jsonRetryIntervalInSeconds) ? (long?)__jsonRetryIntervalInSeconds : _retryIntervalInSecond;} + {_prune = If( json?.PropertyT("prune"), out var __jsonPrune) ? (bool?)__jsonPrune : _prune;} + {_force = If( json?.PropertyT("force"), out var __jsonForce) ? (bool?)__jsonForce : _force;} AfterFromJson(json); } @@ -109,7 +109,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.PowerShell.cs similarity index 62% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.PowerShell.cs index a8563ef78eec..af74a45b5b3b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,29 +65,29 @@ public partial class KustomizationPatchDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new KustomizationPatchDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new KustomizationPatchDefinition(content); } @@ -97,10 +97,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,37 +115,37 @@ internal KustomizationPatchDefinition(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("DependsOn")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).DependsOn = (System.Collections.Generic.List) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RetryIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Prune")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Force")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Force, (__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. @@ -160,31 +160,31 @@ internal KustomizationPatchDefinition(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("DependsOn")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).DependsOn = (System.Collections.Generic.List) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("TimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SyncIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RetryIntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Prune")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Force")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.TypeConverter.cs index 30fa00080f04..42659d0d6f8f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.cs index eeba0d0d7329..921915e52083 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,19 +11,19 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. /// public partial class KustomizationPatchDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinitionInternal { /// Backing field for property. - private string[] _dependsOn; + private System.Collections.Generic.List _dependsOn; /// /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies /// have completed their reconciliation. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string[] DependsOn { get => this._dependsOn; set => this._dependsOn = value; } + public System.Collections.Generic.List DependsOn { get => this._dependsOn; set => this._dependsOn = value; } /// Backing field for property. private bool? _force; @@ -90,16 +90,22 @@ public partial interface IKustomizationPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation.", SerializedName = @"dependsOn", PossibleTypes = new [] { typeof(string) })] - string[] DependsOn { get; set; } + System.Collections.Generic.List DependsOn { get; set; } /// /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change.", SerializedName = @"force", PossibleTypes = new [] { typeof(bool) })] @@ -108,6 +114,9 @@ public partial interface IKustomizationPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The path in the source reference to reconcile on the cluster.", SerializedName = @"path", PossibleTypes = new [] { typeof(string) })] @@ -118,6 +127,9 @@ public partial interface IKustomizationPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable/disable garbage collections of Kubernetes objects created by this Kustomization.", SerializedName = @"prune", PossibleTypes = new [] { typeof(bool) })] @@ -128,6 +140,9 @@ public partial interface IKustomizationPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation.", SerializedName = @"retryIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -136,6 +151,9 @@ public partial interface IKustomizationPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The interval at which to re-reconcile the Kustomization on the cluster.", SerializedName = @"syncIntervalInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -144,6 +162,9 @@ public partial interface IKustomizationPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum time to attempt to reconcile the Kustomization on the cluster.", SerializedName = @"timeoutInSeconds", PossibleTypes = new [] { typeof(long) })] @@ -158,7 +179,7 @@ internal partial interface IKustomizationPatchDefinitionInternal /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies /// have completed their reconciliation. /// - string[] DependsOn { get; set; } + System.Collections.Generic.List DependsOn { get; set; } /// /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.json.cs index 583e47e33d25..766f9f747020 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/KustomizationPatchDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/KustomizationPatchDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class KustomizationPatchDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IKustomizationPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKustomizationPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new KustomizationPatchDefinition(json) : null; } @@ -79,13 +79,13 @@ internal KustomizationPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kuberne { return; } - {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} - {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DependsOn;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} - {_retryIntervalInSecond = If( json?.PropertyT("retryIntervalInSeconds"), out var __jsonRetryIntervalInSeconds) ? (long?)__jsonRetryIntervalInSeconds : RetryIntervalInSecond;} - {_prune = If( json?.PropertyT("prune"), out var __jsonPrune) ? (bool?)__jsonPrune : Prune;} - {_force = If( json?.PropertyT("force"), out var __jsonForce) ? (bool?)__jsonForce : Force;} + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)_path;} + {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _dependsOn;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : _timeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : _syncIntervalInSecond;} + {_retryIntervalInSecond = If( json?.PropertyT("retryIntervalInSeconds"), out var __jsonRetryIntervalInSeconds) ? (long?)__jsonRetryIntervalInSeconds : _retryIntervalInSecond;} + {_prune = If( json?.PropertyT("prune"), out var __jsonPrune) ? (bool?)__jsonPrune : _prune;} + {_force = If( json?.PropertyT("force"), out var __jsonForce) ? (bool?)__jsonForce : _force;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.PowerShell.cs similarity index 83% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.PowerShell.cs index 5fdeb96e6e16..d9cedb0be91c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ManagedIdentityDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedIdentityDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedIdentityDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +113,13 @@ internal ManagedIdentityDefinition(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +134,7 @@ internal ManagedIdentityDefinition(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.TypeConverter.cs index b531eeb5a44b..909389c507bf 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.cs index 87d1833de9e0..4f4dbdee33e4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to authenticate using a Managed Identity. public partial class ManagedIdentityDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinitionInternal { /// Backing field for property. @@ -34,6 +34,9 @@ public partial interface IManagedIdentityDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.json.cs index c3dbbe3692ce..b9da21fe32f5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedIdentityDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ManagedIdentityDefinition(json) : null; } @@ -77,7 +77,7 @@ internal ManagedIdentityDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kubernetes { return; } - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.PowerShell.cs similarity index 82% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.PowerShell.cs index 893fe19f06fd..53123172dbcb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ManagedIdentityPatchDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedIdentityPatchDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedIdentityPatchDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +113,13 @@ internal ManagedIdentityPatchDefinition(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +134,7 @@ internal ManagedIdentityPatchDefinition(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.TypeConverter.cs index ad9e2e6e7b02..a7f4d18eb7d9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.cs index bdd7da2f7181..c8cbbdd8c2de 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to authenticate using a Managed Identity. public partial class ManagedIdentityPatchDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinitionInternal { /// Backing field for property. @@ -34,6 +34,9 @@ public partial interface IManagedIdentityPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Managed Identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.json.cs index 79a20305ec7a..ce11b371ec84 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ManagedIdentityPatchDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ManagedIdentityPatchDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedIdentityPatchDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IManagedIdentityPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IManagedIdentityPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ManagedIdentityPatchDefinition(json) : null; } @@ -77,7 +77,7 @@ internal ManagedIdentityPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kuber { return; } - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.PowerShell.cs similarity index 79% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.PowerShell.cs index 24ad6d5edec4..e49ba13c9d7a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ObjectReferenceDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ObjectReferenceDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ObjectReferenceDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +113,17 @@ internal ObjectReferenceDefinition(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Namespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Namespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Namespace, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +138,11 @@ internal ObjectReferenceDefinition(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Namespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)this).Namespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)this).Namespace, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.TypeConverter.cs index 688bf021df4c..53bfaf26a81f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.cs similarity index 92% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.cs index fff9dd0c14b4..6ab5c840be39 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Object reference to a Kubernetes object on a cluster public partial class ObjectReferenceDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface IObjectReferenceDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the object", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -49,6 +52,9 @@ public partial interface IObjectReferenceDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace of the object", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.json.cs index a5a609e61a2e..2c7f49ee9a6e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectReferenceDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectReferenceDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ObjectReferenceDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ObjectReferenceDefinition(json) : null; } @@ -77,8 +77,8 @@ internal ObjectReferenceDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kubernetes { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)_namespace;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.PowerShell.cs similarity index 67% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.PowerShell.cs index ef3e51c69f9f..9d499e011218 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ObjectStatusConditionDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ObjectStatusConditionDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ObjectStatusConditionDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +113,29 @@ internal ObjectStatusConditionDefinition(global::System.Collections.IDictionary // actually deserialize if (content.Contains("LastTransitionTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime = (global::System.DateTime?) content.GetValueForProperty("LastTransitionTime",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime = (global::System.DateTime?) content.GetValueForProperty("LastTransitionTime",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Reason, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Reason, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)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. @@ -150,23 +150,23 @@ internal ObjectStatusConditionDefinition(global::System.Management.Automation.PS // actually deserialize if (content.Contains("LastTransitionTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime = (global::System.DateTime?) content.GetValueForProperty("LastTransitionTime",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime = (global::System.DateTime?) content.GetValueForProperty("LastTransitionTime",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Reason, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Reason, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.TypeConverter.cs index 362623d784ae..335e55ba1bb7 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.cs index b32e807d0df8..9653632b22c0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Status condition of Kubernetes object public partial class ObjectStatusConditionDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinitionInternal { /// Backing field for property. @@ -62,6 +62,9 @@ public partial interface IObjectStatusConditionDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Last time this status condition has changed", SerializedName = @"lastTransitionTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -70,6 +73,9 @@ public partial interface IObjectStatusConditionDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A more verbose description of the object status condition", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -78,6 +84,9 @@ public partial interface IObjectStatusConditionDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Reason for the specified status condition type status", SerializedName = @"reason", PossibleTypes = new [] { typeof(string) })] @@ -86,6 +95,9 @@ public partial interface IObjectStatusConditionDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the Kubernetes object condition type", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -94,6 +106,9 @@ public partial interface IObjectStatusConditionDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Object status condition type for this object", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.json.cs index adc879cd656e..12d56caa8bda 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusConditionDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusConditionDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ObjectStatusConditionDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ObjectStatusConditionDefinition(json) : null; } @@ -77,11 +77,11 @@ internal ObjectStatusConditionDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kube { return; } - {_lastTransitionTime = If( json?.PropertyT("lastTransitionTime"), out var __jsonLastTransitionTime) ? global::System.DateTime.TryParse((string)__jsonLastTransitionTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastTransitionTimeValue) ? __jsonLastTransitionTimeValue : LastTransitionTime : LastTransitionTime;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_lastTransitionTime = If( json?.PropertyT("lastTransitionTime"), out var __jsonLastTransitionTime) ? global::System.DateTime.TryParse((string)__jsonLastTransitionTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastTransitionTimeValue) ? __jsonLastTransitionTimeValue : _lastTransitionTime : _lastTransitionTime;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)_reason;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.PowerShell.cs new file mode 100644 index 000000000000..2d9f0cbe8feb --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.PowerShell.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + /// + [System.ComponentModel.TypeConverter(typeof(ObjectStatusDefinitionTypeConverter))] + public partial class ObjectStatusDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ObjectStatusDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ObjectStatusDefinition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ObjectStatusDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AppliedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedBy = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition) content.GetValueForProperty("AppliedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedBy, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleaseProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleaseProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition) content.GetValueForProperty("HelmReleaseProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleaseProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).ComplianceState, global::System.Convert.ToString); + } + if (content.Contains("StatusCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).StatusCondition = (System.Collections.Generic.List) content.GetValueForProperty("StatusCondition",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).StatusCondition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusConditionDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("AppliedByName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByName = (string) content.GetValueForProperty("AppliedByName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByName, global::System.Convert.ToString); + } + if (content.Contains("AppliedByNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByNamespace = (string) content.GetValueForProperty("AppliedByNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByNamespace, global::System.Convert.ToString); + } + if (content.Contains("HelmReleasePropertyHelmChartRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition) content.GetValueForProperty("HelmReleasePropertyHelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleasePropertyLastRevisionApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied = (long?) content.GetValueForProperty("HelmReleasePropertyLastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyInstallFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyInstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyUpgradeFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyUpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmChartRefName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + } + if (content.Contains("HelmChartRefNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ObjectStatusDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AppliedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedBy = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition) content.GetValueForProperty("AppliedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedBy, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleaseProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleaseProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition) content.GetValueForProperty("HelmReleaseProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleaseProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).ComplianceState = (string) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).ComplianceState, global::System.Convert.ToString); + } + if (content.Contains("StatusCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).StatusCondition = (System.Collections.Generic.List) content.GetValueForProperty("StatusCondition",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).StatusCondition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusConditionDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("AppliedByName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByName = (string) content.GetValueForProperty("AppliedByName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByName, global::System.Convert.ToString); + } + if (content.Contains("AppliedByNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByNamespace = (string) content.GetValueForProperty("AppliedByNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).AppliedByNamespace, global::System.Convert.ToString); + } + if (content.Contains("HelmReleasePropertyHelmChartRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition) content.GetValueForProperty("HelmReleasePropertyHelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleasePropertyLastRevisionApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied = (long?) content.GetValueForProperty("HelmReleasePropertyLastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyInstallFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyInstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyUpgradeFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyUpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmChartRefName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + } + if (content.Contains("HelmChartRefNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + [System.ComponentModel.TypeConverter(typeof(ObjectStatusDefinitionTypeConverter))] + public partial interface IObjectStatusDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.TypeConverter.cs index c0f614dac98a..629f0d0e467e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.cs similarity index 68% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.cs index e667bfefee91..a9231b7b2017 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,64 +11,64 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Statuses of objects deployed by the user-specified kustomizations from the git repository. /// public partial class ObjectStatusDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition _appliedBy; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition _appliedBy; /// Object reference to the Kustomization that applied this object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition AppliedBy { get => (this._appliedBy = this._appliedBy ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition()); set => this._appliedBy = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition AppliedBy { get => (this._appliedBy = this._appliedBy ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition()); set => this._appliedBy = value; } /// Name of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AppliedByName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)AppliedBy).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)AppliedBy).Name = value ?? null; } + public string AppliedByName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)AppliedBy).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)AppliedBy).Name = value ?? null; } /// Namespace of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AppliedByNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)AppliedBy).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinitionInternal)AppliedBy).Namespace = value ?? null; } + public string AppliedByNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)AppliedBy).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinitionInternal)AppliedBy).Namespace = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? _complianceState; + private string _complianceState; /// /// Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get => this._complianceState; set => this._complianceState = value; } + public string ComplianceState { get => this._complianceState; set => this._complianceState = value; } /// Name of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmChartRefName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefName = value ?? null; } + public string HelmChartRefName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefName = value ?? null; } /// Namespace of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmChartRefNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefNamespace = value ?? null; } + public string HelmChartRefNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefNamespace = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition _helmReleaseProperty; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition _helmReleaseProperty; /// Additional properties that are provided from objects of the HelmRelease kind [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition HelmReleaseProperty { get => (this._helmReleaseProperty = this._helmReleaseProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinition()); set => this._helmReleaseProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition HelmReleaseProperty { get => (this._helmReleaseProperty = this._helmReleaseProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinition()); set => this._helmReleaseProperty = value; } /// Total number of times that the HelmRelease failed to install or upgrade [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? HelmReleasePropertyFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).FailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).FailureCount = value ?? default(long); } + public long? HelmReleasePropertyFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).FailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).FailureCount = value ?? default(long); } /// Number of times that the HelmRelease failed to install [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? HelmReleasePropertyInstallFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).InstallFailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).InstallFailureCount = value ?? default(long); } + public long? HelmReleasePropertyInstallFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).InstallFailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).InstallFailureCount = value ?? default(long); } /// The revision number of the last released object change [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? HelmReleasePropertyLastRevisionApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).LastRevisionApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).LastRevisionApplied = value ?? default(long); } + public long? HelmReleasePropertyLastRevisionApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).LastRevisionApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).LastRevisionApplied = value ?? default(long); } /// Number of times that the HelmRelease failed to upgrade [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public long? HelmReleasePropertyUpgradeFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).UpgradeFailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).UpgradeFailureCount = value ?? default(long); } + public long? HelmReleasePropertyUpgradeFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).UpgradeFailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).UpgradeFailureCount = value ?? default(long); } /// Backing field for property. private string _kind; @@ -78,13 +78,13 @@ public partial class ObjectStatusDefinition : public string Kind { get => this._kind; set => this._kind = value; } /// Internal Acessors for AppliedBy - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal.AppliedBy { get => (this._appliedBy = this._appliedBy ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition()); set { {_appliedBy = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal.AppliedBy { get => (this._appliedBy = this._appliedBy ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition()); set { {_appliedBy = value;} } } /// Internal Acessors for HelmReleaseProperty - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal.HelmReleaseProperty { get => (this._helmReleaseProperty = this._helmReleaseProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinition()); set { {_helmReleaseProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal.HelmReleaseProperty { get => (this._helmReleaseProperty = this._helmReleaseProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinition()); set { {_helmReleaseProperty = value;} } } /// Internal Acessors for HelmReleasePropertyHelmChartRef - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinitionInternal.HelmReleasePropertyHelmChartRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRef = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinitionInternal.HelmReleasePropertyHelmChartRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRef = value; } /// Backing field for property. private string _name; @@ -101,11 +101,11 @@ public partial class ObjectStatusDefinition : public string Namespace { get => this._namespace; set => this._namespace = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition[] _statusCondition; + private System.Collections.Generic.List _statusCondition; /// List of Kubernetes object status conditions present on the cluster [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition[] StatusCondition { get => this._statusCondition; set => this._statusCondition = value; } + public System.Collections.Generic.List StatusCondition { get => this._statusCondition; set => this._statusCondition = value; } /// Creates an new instance. public ObjectStatusDefinition() @@ -121,6 +121,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the object", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +132,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace of the object", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] @@ -139,14 +145,21 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster.", SerializedName = @"complianceState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Compliant", "Non-Compliant", "Pending", "Suspended", "Unknown")] + string ComplianceState { get; set; } /// Name of the object [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the object", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -155,6 +168,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace of the object", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] @@ -163,6 +179,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Total number of times that the HelmRelease failed to install or upgrade", SerializedName = @"failureCount", PossibleTypes = new [] { typeof(long) })] @@ -171,6 +190,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of times that the HelmRelease failed to install", SerializedName = @"installFailureCount", PossibleTypes = new [] { typeof(long) })] @@ -179,6 +201,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The revision number of the last released object change", SerializedName = @"lastRevisionApplied", PossibleTypes = new [] { typeof(long) })] @@ -187,6 +212,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of times that the HelmRelease failed to upgrade", SerializedName = @"upgradeFailureCount", PossibleTypes = new [] { typeof(long) })] @@ -195,6 +223,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Kind of the applied object", SerializedName = @"kind", PossibleTypes = new [] { typeof(string) })] @@ -203,6 +234,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the applied object", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -211,6 +245,9 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace of the applied object", SerializedName = @"namespace", PossibleTypes = new [] { typeof(string) })] @@ -219,10 +256,13 @@ public partial interface IObjectStatusDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of Kubernetes object status conditions present on the cluster", SerializedName = @"statusConditions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition[] StatusCondition { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition) })] + System.Collections.Generic.List StatusCondition { get; set; } } /// Statuses of objects deployed by the user-specified kustomizations from the git repository. @@ -230,7 +270,7 @@ internal partial interface IObjectStatusDefinitionInternal { /// Object reference to the Kustomization that applied this object - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition AppliedBy { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition AppliedBy { get; set; } /// Name of the object string AppliedByName { get; set; } /// Namespace of the object @@ -238,17 +278,18 @@ internal partial interface IObjectStatusDefinitionInternal /// /// Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Compliant", "Non-Compliant", "Pending", "Suspended", "Unknown")] + string ComplianceState { get; set; } /// Name of the object string HelmChartRefName { get; set; } /// Namespace of the object string HelmChartRefNamespace { get; set; } /// Additional properties that are provided from objects of the HelmRelease kind - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmReleasePropertiesDefinition HelmReleaseProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmReleasePropertiesDefinition HelmReleaseProperty { get; set; } /// Total number of times that the HelmRelease failed to install or upgrade long? HelmReleasePropertyFailureCount { get; set; } /// The reference to the HelmChart object used as the source to this HelmRelease - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectReferenceDefinition HelmReleasePropertyHelmChartRef { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectReferenceDefinition HelmReleasePropertyHelmChartRef { get; set; } /// Number of times that the HelmRelease failed to install long? HelmReleasePropertyInstallFailureCount { get; set; } /// The revision number of the last released object change @@ -262,7 +303,7 @@ internal partial interface IObjectStatusDefinitionInternal /// Namespace of the applied object string Namespace { get; set; } /// List of Kubernetes object status conditions present on the cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition[] StatusCondition { get; set; } + System.Collections.Generic.List StatusCondition { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.json.cs similarity index 89% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.json.cs index 4bd142bbd752..be22c27cb515 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ObjectStatusDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ObjectStatusDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ObjectStatusDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ObjectStatusDefinition(json) : null; } @@ -79,13 +79,13 @@ internal ObjectStatusDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCon { return; } - {_appliedBy = If( json?.PropertyT("appliedBy"), out var __jsonAppliedBy) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectReferenceDefinition.FromJson(__jsonAppliedBy) : AppliedBy;} - {_helmReleaseProperty = If( json?.PropertyT("helmReleaseProperties"), out var __jsonHelmReleaseProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmReleasePropertiesDefinition.FromJson(__jsonHelmReleaseProperties) : HelmReleaseProperty;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} - {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} - {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)ComplianceState;} - {_statusCondition = If( json?.PropertyT("statusConditions"), out var __jsonStatusConditions) ? If( __jsonStatusConditions as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IObjectStatusConditionDefinition) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ObjectStatusConditionDefinition.FromJson(__u) )) ))() : null : StatusCondition;} + {_appliedBy = If( json?.PropertyT("appliedBy"), out var __jsonAppliedBy) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectReferenceDefinition.FromJson(__jsonAppliedBy) : _appliedBy;} + {_helmReleaseProperty = If( json?.PropertyT("helmReleaseProperties"), out var __jsonHelmReleaseProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmReleasePropertiesDefinition.FromJson(__jsonHelmReleaseProperties) : _helmReleaseProperty;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)_namespace;} + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} + {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)_complianceState;} + {_statusCondition = If( json?.PropertyT("statusConditions"), out var __jsonStatusConditions) ? If( __jsonStatusConditions as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IObjectStatusConditionDefinition) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ObjectStatusConditionDefinition.FromJson(__u) )) ))() : null : _statusCondition;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.PowerShell.cs similarity index 74% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.PowerShell.cs index 8451bda84e7e..5453fe0ab6f8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class OperationStatusList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationStatusList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationStatusList(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal OperationStatusList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal OperationStatusList(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.TypeConverter.cs index 1070f1ffa9a5..09c7c9658118 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IOperationStatusList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.cs similarity index 71% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.cs index f7adaa197608..ada26164b56b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The async operations in progress, in the cluster. public partial class OperationStatusList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class OperationStatusList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] _value; + private System.Collections.Generic.List _value; /// List of async operations in progress, in the cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public OperationStatusList() @@ -47,6 +47,9 @@ public partial interface IOperationStatusList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of Operation Result objects, if any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -55,10 +58,13 @@ public partial interface IOperationStatusList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of async operations in progress, in the cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult) })] + System.Collections.Generic.List Value { get; } } /// The async operations in progress, in the cluster. @@ -68,7 +74,7 @@ internal partial interface IOperationStatusListInternal /// URL to get the next set of Operation Result objects, if any. string NextLink { get; set; } /// List of async operations in progress, in the cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.json.cs index 0d7948710328..9781b4a5b46d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusList.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationStatusList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new OperationStatusList(json) : null; } @@ -77,8 +77,8 @@ internal OperationStatusList(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfig { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResult.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.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.PowerShell.cs similarity index 54% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.PowerShell.cs index 4df551a06253..146d8bac172f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class OperationStatusResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationStatusResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationStatusResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,49 +111,49 @@ internal OperationStatusResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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. @@ -170,43 +168,43 @@ internal OperationStatusResult(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.TypeConverter.cs index aa81be86ec0d..1ab84951921d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.cs similarity index 67% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.cs index e63d8f02f85a..688e3374b772 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.cs @@ -3,34 +3,34 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The current status of an async operation. public partial class OperationStatusResult : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail _error; /// If present, details of the operation error. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail()); } /// Backing field for property. private string _id; @@ -41,25 +41,25 @@ public partial class OperationStatusResult : /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Target = value; } /// Backing field for property. private string _name; @@ -69,11 +69,11 @@ public partial class OperationStatusResult : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties _property; /// Additional information, if available. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties()); set => this._property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] @@ -88,7 +88,7 @@ public partial class OperationStatusResult : /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetailInternal)Error).Target; } /// Creates an new instance. public OperationStatusResult() @@ -104,14 +104,20 @@ public partial interface IOperationStatusResult : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -120,14 +126,20 @@ public partial interface IOperationStatusResult : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// Fully qualified ID for the async operation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Fully qualified ID for the async operation.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -136,6 +148,9 @@ public partial interface IOperationStatusResult : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -144,6 +159,9 @@ public partial interface IOperationStatusResult : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the async operation.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -152,14 +170,20 @@ public partial interface IOperationStatusResult : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Additional information, if available.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties Property { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties Property { get; set; } /// Operation status. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Operation status.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -168,6 +192,9 @@ public partial interface IOperationStatusResult : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -179,13 +206,13 @@ internal partial interface IOperationStatusResultInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// If present, details of the operation error. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorDetail Error { get; set; } /// Fully qualified ID for the async operation. string Id { get; set; } /// The error message. @@ -193,7 +220,7 @@ internal partial interface IOperationStatusResultInternal /// Name of the async operation. string Name { get; set; } /// Additional information, if available. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties Property { get; set; } /// Operation status. string Status { get; set; } /// The error target. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.json.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.json.cs index b67c0b320527..3a31941f5fb0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResult.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationStatusResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new OperationStatusResult(json) : null; } @@ -77,11 +77,11 @@ internal OperationStatusResult(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConf { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties.FromJson(__jsonProperties) : Property;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ErrorDetail.FromJson(__jsonError) : _error;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.PowerShell.cs similarity index 88% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.PowerShell.cs index aa6e6a79ca18..ebd288eb41a2 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class OperationStatusResultProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationStatusResultProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationStatusResultProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -117,7 +117,7 @@ internal OperationStatusResultProperties(global::System.Collections.IDictionary } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.TypeConverter.cs index 6072b112330a..595301843249 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.cs index d9d86b4b7de0..f4c139c79975 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Additional information, if available. public partial class OperationStatusResultProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultPropertiesInternal { /// Creates an new instance. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.dictionary.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.dictionary.cs index 35f331c5fc6f..f2e749df98b1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.OperationStatusResultProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.json.cs index 3742f4c84722..95a32d8138cc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/OperationStatusResultProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/OperationStatusResultProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationStatusResultProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new OperationStatusResultProperties(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.PowerShell.cs similarity index 60% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.PowerShell.cs index bd106ccbc304..1cf113bd21a2 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PatchExtension partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtension(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtension(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +111,33 @@ internal PatchExtension(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("AutoUpgradeMinorVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ReleaseTrain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); } if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); } if (content.Contains("ConfigurationSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); } if (content.Contains("ConfigurationProtectedSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -154,27 +152,27 @@ internal PatchExtension(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("AutoUpgradeMinorVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ReleaseTrain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); } if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); } if (content.Contains("ConfigurationSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); } if (content.Contains("ConfigurationProtectedSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.TypeConverter.cs index 82bef6b8cff5..39d12bdd5ed4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IPatchExtension ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.cs similarity index 70% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.cs index e794a5426f18..0a92b314d044 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.cs @@ -3,55 +3,55 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The Extension Patch Request object. public partial class PatchExtension : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal { /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } + public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties _property; /// Updatable properties of an Extension Patch Request [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionProperties()); set => this._property = value; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } + public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } /// /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be /// 'false'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)Property).Version = value ?? null; } + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)Property).Version = value ?? null; } /// Creates an new instance. public PatchExtension() @@ -69,6 +69,9 @@ public partial interface IPatchExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(bool) })] @@ -79,18 +82,24 @@ public partial interface IPatchExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. @@ -98,6 +107,9 @@ public partial interface IPatchExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +121,9 @@ public partial interface IPatchExtension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] @@ -126,11 +141,11 @@ internal partial interface IPatchExtensionInternal /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Updatable properties of an Extension Patch Request - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties Property { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.json.cs index fd19487aa657..9693df5b3c5d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtension.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtension.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PatchExtension partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtension(json) : null; } @@ -77,7 +77,7 @@ internal PatchExtension(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurati { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.PowerShell.cs similarity index 63% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.PowerShell.cs index 0ad60d30adcc..b9e3adf342d7 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class PatchExtensionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtensionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtensionProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +113,29 @@ internal PatchExtensionProperties(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("AutoUpgradeMinorVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ReleaseTrain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); } if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); } if (content.Contains("ConfigurationSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); } if (content.Contains("ConfigurationProtectedSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +150,23 @@ internal PatchExtensionProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("AutoUpgradeMinorVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ReleaseTrain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); } if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); } if (content.Contains("ConfigurationSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); } if (content.Contains("ConfigurationProtectedSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.TypeConverter.cs index 5cfc17de72a8..c96c6ac03510 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.cs similarity index 80% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.cs index b27a6351f819..4b22b64968d8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Updatable properties of an Extension Patch Request public partial class PatchExtensionProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesInternal { /// Backing field for property. @@ -23,20 +23,20 @@ public partial class PatchExtensionProperties : public bool? AutoUpgradeMinorVersion { get => this._autoUpgradeMinorVersion; set => this._autoUpgradeMinorVersion = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings _configurationSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings _configurationSetting; /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } /// Backing field for property. private string _releaseTrain; @@ -74,6 +74,9 @@ public partial interface IPatchExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(bool) })] @@ -84,18 +87,24 @@ public partial interface IPatchExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. @@ -103,6 +112,9 @@ public partial interface IPatchExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +126,9 @@ public partial interface IPatchExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] @@ -131,9 +146,9 @@ internal partial interface IPatchExtensionPropertiesInternal /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.json.cs similarity index 92% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.json.cs index 777a8e72cdc9..6ee491d09f8a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PatchExtensionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtensionProperties(json) : null; } @@ -77,11 +77,11 @@ internal PatchExtensionProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesC { return; } - {_autoUpgradeMinorVersion = If( json?.PropertyT("autoUpgradeMinorVersion"), out var __jsonAutoUpgradeMinorVersion) ? (bool?)__jsonAutoUpgradeMinorVersion : AutoUpgradeMinorVersion;} - {_releaseTrain = If( json?.PropertyT("releaseTrain"), out var __jsonReleaseTrain) ? (string)__jsonReleaseTrain : (string)ReleaseTrain;} - {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} - {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : ConfigurationSetting;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_autoUpgradeMinorVersion = If( json?.PropertyT("autoUpgradeMinorVersion"), out var __jsonAutoUpgradeMinorVersion) ? (bool?)__jsonAutoUpgradeMinorVersion : _autoUpgradeMinorVersion;} + {_releaseTrain = If( json?.PropertyT("releaseTrain"), out var __jsonReleaseTrain) ? (string)__jsonReleaseTrain : (string)_releaseTrain;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : _configurationSetting;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : _configurationProtectedSetting;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs index 917e0112d6b3..e172b581cace 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,29 +65,29 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtensionPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtensionPropertiesConfigurationProtectedSettings(content); } @@ -100,10 +100,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -122,7 +122,7 @@ internal PatchExtensionPropertiesConfigurationProtectedSettings(global::System.C } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs index 7d5e7300c01d..9ecf06a804b3 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.cs similarity index 89% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.cs index d2789b18cd5c..52b753843b71 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// public partial class PatchExtensionPropertiesConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs index 0619eb3426ab..f0053485e0f4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs index d541e49674ca..dd749ebcae81 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtensionPropertiesConfigurationProtectedSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs similarity index 87% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs index 40e539c45093..e8cc050baab2 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class PatchExtensionPropertiesConfigurationSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtensionPropertiesConfigurationSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtensionPropertiesConfigurationSettings(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -120,7 +120,7 @@ internal PatchExtensionPropertiesConfigurationSettings(global::System.Collection } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs index 775adf2235b8..650e42a82824 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.cs index d232abd52d1e..f4e81ea09298 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Configuration settings, as name-value pairs for configuring this extension. public partial class PatchExtensionPropertiesConfigurationSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettingsInternal { /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.dictionary.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.dictionary.cs similarity index 96% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.dictionary.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.dictionary.cs index 0c73893466ae..7aca19d2bfa6 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.dictionary.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.json.cs index 414ef084bde0..c08145ed5119 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/PatchExtensionPropertiesConfigurationSettings.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/PatchExtensionPropertiesConfigurationSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PatchExtensionPropertiesConfigurationSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtensionPropertiesConfigurationSettings(json) : null; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.PowerShell.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.PowerShell.cs index d686ffffaddc..11ceee2af521 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Plan partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Plan(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Plan(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,29 +111,29 @@ internal Plan(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Publisher")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Publisher, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Publisher, global::System.Convert.ToString); } if (content.Contains("Product")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Product, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Product, global::System.Convert.ToString); } if (content.Contains("PromotionCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); } if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Version, 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. @@ -148,23 +148,23 @@ internal Plan(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Publisher")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Publisher, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Publisher, global::System.Convert.ToString); } if (content.Contains("Product")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Product, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Product, global::System.Convert.ToString); } if (content.Contains("PromotionCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); } if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal)this).Version, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.TypeConverter.cs index ebe90457fb88..3cc93e0beac0 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IPlan ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.cs index 58fd171d5ec5..d30331d93194 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Plan for the resource. public partial class Plan : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlanInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlanInternal { /// Backing field for property. @@ -67,6 +67,9 @@ public partial interface IPlan : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A user defined name of the 3rd Party Artifact that is being procured.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -78,6 +81,9 @@ public partial interface IPlan : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", SerializedName = @"product", PossibleTypes = new [] { typeof(string) })] @@ -88,6 +94,9 @@ public partial interface IPlan : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", SerializedName = @"promotionCode", PossibleTypes = new [] { typeof(string) })] @@ -96,6 +105,9 @@ public partial interface IPlan : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", SerializedName = @"publisher", PossibleTypes = new [] { typeof(string) })] @@ -104,6 +116,9 @@ public partial interface IPlan : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The version of the desired product/artifact.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.json.cs index a8c7401cc48a..1bf3ab44bded 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Plan.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Plan.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Plan partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IPlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Plan(json) : null; } @@ -77,11 +77,11 @@ internal Plan(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)Publisher;} - {_product = If( json?.PropertyT("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)Product;} - {_promotionCode = If( json?.PropertyT("promotionCode"), out var __jsonPromotionCode) ? (string)__jsonPromotionCode : (string)PromotionCode;} - {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)_publisher;} + {_product = If( json?.PropertyT("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)_product;} + {_promotionCode = If( json?.PropertyT("promotionCode"), out var __jsonPromotionCode) ? (string)__jsonPromotionCode : (string)_promotionCode;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.PowerShell.cs similarity index 78% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.PowerShell.cs index f41d6a9f2c5a..e34aaa843754 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class ProxyResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProxyResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProxyResource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal ProxyResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ProxyResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs index 9ba39d29fe9e..da72159855b4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IProxyResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.cs index 8fbc8bc455d5..c61ece43a919 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,40 +11,40 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location /// public partial class ProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Resource(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Name; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__resource).Type; } /// Creates an new instance. public ProxyResource() @@ -67,13 +67,13 @@ public ProxyResource() /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location public partial interface IProxyResource : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource { } /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location internal partial interface IProxyResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal { } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.json.cs index e9704cb7cbef..29cb22336feb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/ProxyResource.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ProxyResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProxyResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; } @@ -79,7 +79,7 @@ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguratio { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Resource(json); AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.PowerShell.cs similarity index 72% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.PowerShell.cs index a1d554f11a30..c9dbe40bda9e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class RepositoryRefDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RepositoryRefDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RepositoryRefDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,25 @@ internal RepositoryRefDefinition(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Branch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Branch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Branch, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Tag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Tag, global::System.Convert.ToString); } if (content.Contains("Semver")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Semver = (string) content.GetValueForProperty("Semver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Semver, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Semver = (string) content.GetValueForProperty("Semver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Semver, global::System.Convert.ToString); } if (content.Contains("Commit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Commit = (string) content.GetValueForProperty("Commit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Commit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Commit = (string) content.GetValueForProperty("Commit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Commit, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +146,19 @@ internal RepositoryRefDefinition(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Branch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Branch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Branch, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Tag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Tag, global::System.Convert.ToString); } if (content.Contains("Semver")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Semver = (string) content.GetValueForProperty("Semver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Semver, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Semver = (string) content.GetValueForProperty("Semver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Semver, global::System.Convert.ToString); } if (content.Contains("Commit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Commit = (string) content.GetValueForProperty("Commit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal)this).Commit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Commit = (string) content.GetValueForProperty("Commit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal)this).Commit, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.TypeConverter.cs index 350028debd1e..d20fdbb89604 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.cs index 0099cadd9034..f3ae5fb7eb97 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The source reference for the GitRepository object. public partial class RepositoryRefDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinitionInternal { /// Backing field for property. @@ -59,6 +59,9 @@ public partial interface IRepositoryRefDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository branch name to checkout.", SerializedName = @"branch", PossibleTypes = new [] { typeof(string) })] @@ -69,6 +72,9 @@ public partial interface IRepositoryRefDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", SerializedName = @"commit", PossibleTypes = new [] { typeof(string) })] @@ -79,6 +85,9 @@ public partial interface IRepositoryRefDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", SerializedName = @"semver", PossibleTypes = new [] { typeof(string) })] @@ -87,6 +96,9 @@ public partial interface IRepositoryRefDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The git repository tag name to checkout. This takes precedence over branch.", SerializedName = @"tag", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.json.cs index aeecbc491b79..bfc103aa7ec5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/RepositoryRefDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/RepositoryRefDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RepositoryRefDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IRepositoryRefDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IRepositoryRefDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new RepositoryRefDefinition(json) : null; } @@ -77,10 +77,10 @@ internal RepositoryRefDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesCo { return; } - {_branch = If( json?.PropertyT("branch"), out var __jsonBranch) ? (string)__jsonBranch : (string)Branch;} - {_tag = If( json?.PropertyT("tag"), out var __jsonTag) ? (string)__jsonTag : (string)Tag;} - {_semver = If( json?.PropertyT("semver"), out var __jsonSemver) ? (string)__jsonSemver : (string)Semver;} - {_commit = If( json?.PropertyT("commit"), out var __jsonCommit) ? (string)__jsonCommit : (string)Commit;} + {_branch = If( json?.PropertyT("branch"), out var __jsonBranch) ? (string)__jsonBranch : (string)_branch;} + {_tag = If( json?.PropertyT("tag"), out var __jsonTag) ? (string)__jsonTag : (string)_tag;} + {_semver = If( json?.PropertyT("semver"), out var __jsonSemver) ? (string)__jsonSemver : (string)_semver;} + {_commit = If( json?.PropertyT("commit"), out var __jsonCommit) ? (string)__jsonCommit : (string)_commit;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.PowerShell.cs similarity index 78% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.PowerShell.cs index 43226a57e0e4..708ca1519c03 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.TypeConverter.cs index a13a6d6f5e3a..ce972661149d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.cs index 06d0cc7493f5..c6c0084020e8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Common fields that are returned in the response for all Azure Resource Manager resources /// public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Resource.json.cs index d41d76d50144..1fafc009af60 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/Resource.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -79,9 +79,9 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Run { 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.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.PowerShell.cs similarity index 60% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.PowerShell.cs index ea1258a2822c..c4a5800baf08 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ResourceProviderOperation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceProviderOperation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceProviderOperation(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,41 +113,41 @@ internal ResourceProviderOperation(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)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. @@ -162,35 +162,35 @@ internal ResourceProviderOperation(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.TypeConverter.cs index 6cdc6874867a..4e73b330c16f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.cs similarity index 76% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.cs index e4c960ca06dc..415bcd8c8dbb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.cs @@ -3,38 +3,38 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Supported operation of this resource provider. public partial class ResourceProviderOperation : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay _display; /// Display metadata associated with the operation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplay()); set => this._display = value; } /// Description of this operation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Description = value ?? null; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Description = value ?? null; } /// Type of operation: get, read, delete, etc. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Operation = value ?? null; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Operation = value ?? null; } /// Resource provider: Microsoft KubernetesConfiguration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Provider = value ?? null; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Provider = value ?? null; } /// Resource on which the operation is performed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Resource = value ?? null; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)Display).Resource = value ?? null; } /// Backing field for property. private bool? _isDataAction; @@ -44,13 +44,13 @@ public partial class ResourceProviderOperation : public bool? IsDataAction { get => this._isDataAction; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplay()); set { {_display = value;} } } /// Internal Acessors for IsDataAction - bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } /// Internal Acessors for Origin - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } /// Backing field for property. private string _name; @@ -80,6 +80,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of this operation.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -88,6 +91,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of operation: get, read, delete, etc.", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -96,6 +102,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource provider: Microsoft KubernetesConfiguration.", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -104,6 +113,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource on which the operation is performed.", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] @@ -112,6 +124,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The flag that indicates whether the operation applies to data plane.", SerializedName = @"isDataAction", PossibleTypes = new [] { typeof(bool) })] @@ -120,6 +135,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Operation name, in format of {provider}/{resource}/{operation}", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -128,6 +146,9 @@ public partial interface IResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Origin of the operation", SerializedName = @"origin", PossibleTypes = new [] { typeof(string) })] @@ -139,7 +160,7 @@ internal partial interface IResourceProviderOperationInternal { /// Display metadata associated with the operation. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay Display { get; set; } /// Description of this operation. string DisplayDescription { get; set; } /// Type of operation: get, read, delete, etc. diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.json.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.json.cs index e9601d54e061..e3b24a13bd4c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperation.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceProviderOperation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperation(json) : null; } @@ -77,10 +77,10 @@ internal ResourceProviderOperation(Microsoft.Azure.PowerShell.Cmdlets.Kubernetes { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} - {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} AfterFromJson(json); } @@ -105,11 +105,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J } AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.PowerShell.cs similarity index 71% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.PowerShell.cs index 25c296de65f8..c4187bede93d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ResourceProviderOperationDisplay partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceProviderOperationDisplay(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceProviderOperationDisplay(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,25 @@ internal ResourceProviderOperationDisplay(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +146,19 @@ internal ResourceProviderOperationDisplay(global::System.Management.Automation.P // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.TypeConverter.cs index c017b54a14e3..00621a659978 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.cs similarity index 93% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.cs index b14febd37c85..7d3cdb272fef 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Display metadata associated with the operation. public partial class ResourceProviderOperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplayInternal { /// Backing field for property. @@ -55,6 +55,9 @@ public partial interface IResourceProviderOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of this operation.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -63,6 +66,9 @@ public partial interface IResourceProviderOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of operation: get, read, delete, etc.", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -71,6 +77,9 @@ public partial interface IResourceProviderOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource provider: Microsoft KubernetesConfiguration.", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -79,6 +88,9 @@ public partial interface IResourceProviderOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource on which the operation is performed.", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.json.cs index 073ff0c1c3a5..c27b44244944 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationDisplay.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceProviderOperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperationDisplay(json) : null; } @@ -77,10 +77,10 @@ internal ResourceProviderOperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Kub { 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.PowerShell.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.PowerShell.cs index 8894840a40ee..12362cdbee8e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ResourceProviderOperationList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceProviderOperationList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceProviderOperationList(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +113,17 @@ internal ResourceProviderOperationList(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +138,11 @@ internal ResourceProviderOperationList(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.TypeConverter.cs index c5ad4b737529..4e40eab16d41 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.cs index 1012ca43729b..f3078c1d2749 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Result of the request to list operations. public partial class ResourceProviderOperationList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -24,11 +24,11 @@ public partial class ResourceProviderOperationList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] _value; + private System.Collections.Generic.List _value; /// List of operations supported by this resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] 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 ResourceProviderOperationList() @@ -44,6 +44,9 @@ public partial interface IResourceProviderOperationList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to the next set of results, if any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -52,10 +55,13 @@ public partial interface IResourceProviderOperationList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of operations supported by this resource provider.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation) })] + System.Collections.Generic.List Value { get; set; } } /// Result of the request to list operations. @@ -65,7 +71,7 @@ internal partial interface IResourceProviderOperationListInternal /// URL to the next set of results, if any. string NextLink { get; set; } /// List of operations supported by this resource provider. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.json.cs index e99a1309b102..c7229b982ee1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20220301/ResourceProviderOperationList.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ResourceProviderOperationList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceProviderOperationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperationList(json) : null; } @@ -77,8 +77,8 @@ internal ResourceProviderOperationList(Microsoft.Azure.PowerShell.Cmdlets.Kubern { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ResourceProviderOperation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -110,7 +110,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.PowerShell.cs similarity index 69% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.PowerShell.cs index 8d2e7ad8808e..64744a00cc5a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Scope partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Scope(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Scope(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal Scope(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Cluster")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeClusterTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeClusterTypeConverter.ConvertFrom); } if (content.Contains("Namespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespaceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespaceTypeConverter.ConvertFrom); } if (content.Contains("ClusterReleaseNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); } if (content.Contains("NamespaceTargetNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal Scope(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Cluster")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeClusterTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeClusterTypeConverter.ConvertFrom); } if (content.Contains("Namespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespaceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespaceTypeConverter.ConvertFrom); } if (content.Contains("ClusterReleaseNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); } if (content.Contains("NamespaceTargetNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.TypeConverter.cs index 9a59ade875f0..4664b80f0b2a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IScope ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.cs index f32f14b44066..40944c369b3d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.cs @@ -3,49 +3,49 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Scope of the extension. It can be either Cluster or Namespace; but not both. public partial class Scope : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster _cluster; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster _cluster; /// Specifies that the scope of the extension is Cluster [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeCluster()); set => this._cluster = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeCluster()); set => this._cluster = value; } /// /// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, /// it will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal)Cluster).ReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal)Cluster).ReleaseNamespace = value ?? null; } + public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal)Cluster).ReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal)Cluster).ReleaseNamespace = value ?? null; } /// Internal Acessors for Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal.Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeCluster()); set { {_cluster = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal.Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeCluster()); set { {_cluster = value;} } } /// Internal Acessors for Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeInternal.Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespace()); set { {_namespace = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeInternal.Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespace()); set { {_namespace = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace _namespace; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace _namespace; /// Specifies that the scope of the extension is Namespace [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespace()); set => this._namespace = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespace()); set => this._namespace = value; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal)Namespace).TargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal)Namespace).TargetNamespace = value ?? null; } + public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal)Namespace).TargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal)Namespace).TargetNamespace = value ?? null; } /// Creates an new instance. public Scope() @@ -64,6 +64,9 @@ public partial interface IScope : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created", SerializedName = @"releaseNamespace", PossibleTypes = new [] { typeof(string) })] @@ -75,6 +78,9 @@ public partial interface IScope : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] @@ -86,14 +92,14 @@ internal partial interface IScopeInternal { /// Specifies that the scope of the extension is Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster Cluster { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster Cluster { get; set; } /// /// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, /// it will be created /// string ClusterReleaseNamespace { get; set; } /// Specifies that the scope of the extension is Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace Namespace { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace Namespace { get; set; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.json.cs index 635e177cc449..175f5453f89b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/Scope.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Scope.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Scope partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScope FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScope FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Scope(json) : null; } @@ -77,8 +77,8 @@ internal Scope(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtim { return; } - {_cluster = If( json?.PropertyT("cluster"), out var __jsonCluster) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeCluster.FromJson(__jsonCluster) : Cluster;} - {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ScopeNamespace.FromJson(__jsonNamespace) : Namespace;} + {_cluster = If( json?.PropertyT("cluster"), out var __jsonCluster) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeCluster.FromJson(__jsonCluster) : _cluster;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ScopeNamespace.FromJson(__jsonNamespace) : _namespace;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.PowerShell.cs similarity index 83% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.PowerShell.cs index 887db644f121..b3f5afa99f05 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ScopeCluster partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScopeCluster(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScopeCluster(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +111,13 @@ internal ScopeCluster(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReleaseNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +132,7 @@ internal ScopeCluster(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReleaseNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.TypeConverter.cs index 720f625de223..6d95f064c269 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IScopeCluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.cs index 2e9a9fbb7252..cc9713c9e09f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Specifies that the scope of the extension is Cluster public partial class ScopeCluster : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeClusterInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeClusterInternal { /// Backing field for property. @@ -40,6 +40,9 @@ public partial interface IScopeCluster : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created", SerializedName = @"releaseNamespace", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.json.cs index 37a45304d4f4..f647a5e1ec73 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeCluster.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeCluster.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ScopeCluster partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ScopeCluster(json) : null; } @@ -77,7 +77,7 @@ internal ScopeCluster(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration { return; } - {_releaseNamespace = If( json?.PropertyT("releaseNamespace"), out var __jsonReleaseNamespace) ? (string)__jsonReleaseNamespace : (string)ReleaseNamespace;} + {_releaseNamespace = If( json?.PropertyT("releaseNamespace"), out var __jsonReleaseNamespace) ? (string)__jsonReleaseNamespace : (string)_releaseNamespace;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.PowerShell.cs similarity index 83% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.PowerShell.cs index 0c0106c87150..ff5b340f9e36 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ScopeNamespace partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScopeNamespace(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScopeNamespace(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +111,13 @@ internal ScopeNamespace(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("TargetNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +132,7 @@ internal ScopeNamespace(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("TargetNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.TypeConverter.cs index e1f226d4c72d..e7a836eae11a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IScopeNamespace ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.cs index 41a091716901..d210a584f9e4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Specifies that the scope of the extension is Namespace public partial class ScopeNamespace : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespaceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespaceInternal { /// Backing field for property. @@ -40,6 +40,9 @@ public partial interface IScopeNamespace : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.json.cs similarity index 95% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.json.cs index e5b9af9683e6..b42b41318891 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ScopeNamespace.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ScopeNamespace.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ScopeNamespace partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IScopeNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IScopeNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ScopeNamespace(json) : null; } @@ -77,7 +77,7 @@ internal ScopeNamespace(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurati { return; } - {_targetNamespace = If( json?.PropertyT("targetNamespace"), out var __jsonTargetNamespace) ? (string)__jsonTargetNamespace : (string)TargetNamespace;} + {_targetNamespace = If( json?.PropertyT("targetNamespace"), out var __jsonTargetNamespace) ? (string)__jsonTargetNamespace : (string)_targetNamespace;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.PowerShell.cs similarity index 65% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.PowerShell.cs index 2edd5a63c2a6..38d843b1077d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ServicePrincipalDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ServicePrincipalDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ServicePrincipalDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +113,33 @@ internal ServicePrincipalDefinition(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("ClientSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); } if (content.Contains("ClientCertificate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); } if (content.Contains("ClientCertificatePassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); } if (content.Contains("ClientCertificateSendChain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain, (__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. @@ -154,27 +154,27 @@ internal ServicePrincipalDefinition(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("ClientSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); } if (content.Contains("ClientCertificate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); } if (content.Contains("ClientCertificatePassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); } if (content.Contains("ClientCertificateSendChain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal)this).ClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.TypeConverter.cs index 6f7a76ae5055..8a78d8ba4e90 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.cs index 0a9e661e949a..76ac5ba04bc5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to authenticate using Service Principal. public partial class ServicePrincipalDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinitionInternal { /// Backing field for property. @@ -72,6 +72,9 @@ public partial interface IServicePrincipalDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -80,6 +83,9 @@ public partial interface IServicePrincipalDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -91,6 +97,9 @@ public partial interface IServicePrincipalDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -99,6 +108,9 @@ public partial interface IServicePrincipalDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -107,6 +119,9 @@ public partial interface IServicePrincipalDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -115,6 +130,9 @@ public partial interface IServicePrincipalDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.json.cs index 67e7e6a62bf1..59b737e172ae 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServicePrincipalDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ServicePrincipalDefinition(json) : null; } @@ -77,12 +77,12 @@ internal ServicePrincipalDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kubernete { return; } - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_clientSecret = If( json?.PropertyT("clientSecret"), out var __jsonClientSecret) ? (string)__jsonClientSecret : (string)ClientSecret;} - {_clientCertificate = If( json?.PropertyT("clientCertificate"), out var __jsonClientCertificate) ? (string)__jsonClientCertificate : (string)ClientCertificate;} - {_clientCertificatePassword = If( json?.PropertyT("clientCertificatePassword"), out var __jsonClientCertificatePassword) ? (string)__jsonClientCertificatePassword : (string)ClientCertificatePassword;} - {_clientCertificateSendChain = If( json?.PropertyT("clientCertificateSendChain"), out var __jsonClientCertificateSendChain) ? (bool?)__jsonClientCertificateSendChain : ClientCertificateSendChain;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_clientSecret = If( json?.PropertyT("clientSecret"), out var __jsonClientSecret) ? (string)__jsonClientSecret : (string)_clientSecret;} + {_clientCertificate = If( json?.PropertyT("clientCertificate"), out var __jsonClientCertificate) ? (string)__jsonClientCertificate : (string)_clientCertificate;} + {_clientCertificatePassword = If( json?.PropertyT("clientCertificatePassword"), out var __jsonClientCertificatePassword) ? (string)__jsonClientCertificatePassword : (string)_clientCertificatePassword;} + {_clientCertificateSendChain = If( json?.PropertyT("clientCertificateSendChain"), out var __jsonClientCertificateSendChain) ? (bool?)__jsonClientCertificateSendChain : _clientCertificateSendChain;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.PowerShell.cs similarity index 65% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.PowerShell.cs index 87355121916e..93076445057e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ServicePrincipalPatchDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ServicePrincipalPatchDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ServicePrincipalPatchDefinition(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,33 +113,33 @@ internal ServicePrincipalPatchDefinition(global::System.Collections.IDictionary // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("ClientSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); } if (content.Contains("ClientCertificate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); } if (content.Contains("ClientCertificatePassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); } if (content.Contains("ClientCertificateSendChain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain, (__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. @@ -154,27 +154,27 @@ internal ServicePrincipalPatchDefinition(global::System.Management.Automation.PS // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("ClientSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientSecret = (string) content.GetValueForProperty("ClientSecret",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientSecret, global::System.Convert.ToString); } if (content.Contains("ClientCertificate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate = (string) content.GetValueForProperty("ClientCertificate",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificate, global::System.Convert.ToString); } if (content.Contains("ClientCertificatePassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword = (string) content.GetValueForProperty("ClientCertificatePassword",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificatePassword, global::System.Convert.ToString); } if (content.Contains("ClientCertificateSendChain")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain = (bool?) content.GetValueForProperty("ClientCertificateSendChain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal)this).ClientCertificateSendChain, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.TypeConverter.cs index ca1b29161cb4..e6f382c518d1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.cs index 76f30f3aead0..9a85f9eb1fb1 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Parameters to authenticate using Service Principal. public partial class ServicePrincipalPatchDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinitionInternal { /// Backing field for property. @@ -72,6 +72,9 @@ public partial interface IServicePrincipalPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificate", PossibleTypes = new [] { typeof(string) })] @@ -80,6 +83,9 @@ public partial interface IServicePrincipalPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password for the certificate used to authenticate a Service Principal ", SerializedName = @"clientCertificatePassword", PossibleTypes = new [] { typeof(string) })] @@ -91,6 +97,9 @@ public partial interface IServicePrincipalPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate", SerializedName = @"clientCertificateSendChain", PossibleTypes = new [] { typeof(bool) })] @@ -99,6 +108,9 @@ public partial interface IServicePrincipalPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client Id for authenticating a Service Principal.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -107,6 +119,9 @@ public partial interface IServicePrincipalPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The client secret for authenticating a Service Principal", SerializedName = @"clientSecret", PossibleTypes = new [] { typeof(string) })] @@ -115,6 +130,9 @@ public partial interface IServicePrincipalPatchDefinition : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant Id for authenticating a Service Principal", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.json.cs index a9c1f9d55b3d..4bcc5c29ccc6 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/ServicePrincipalPatchDefinition.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/ServicePrincipalPatchDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServicePrincipalPatchDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IServicePrincipalPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IServicePrincipalPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ServicePrincipalPatchDefinition(json) : null; } @@ -77,12 +77,12 @@ internal ServicePrincipalPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.Kube { return; } - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_clientSecret = If( json?.PropertyT("clientSecret"), out var __jsonClientSecret) ? (string)__jsonClientSecret : (string)ClientSecret;} - {_clientCertificate = If( json?.PropertyT("clientCertificate"), out var __jsonClientCertificate) ? (string)__jsonClientCertificate : (string)ClientCertificate;} - {_clientCertificatePassword = If( json?.PropertyT("clientCertificatePassword"), out var __jsonClientCertificatePassword) ? (string)__jsonClientCertificatePassword : (string)ClientCertificatePassword;} - {_clientCertificateSendChain = If( json?.PropertyT("clientCertificateSendChain"), out var __jsonClientCertificateSendChain) ? (bool?)__jsonClientCertificateSendChain : ClientCertificateSendChain;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_clientSecret = If( json?.PropertyT("clientSecret"), out var __jsonClientSecret) ? (string)__jsonClientSecret : (string)_clientSecret;} + {_clientCertificate = If( json?.PropertyT("clientCertificate"), out var __jsonClientCertificate) ? (string)__jsonClientCertificate : (string)_clientCertificate;} + {_clientCertificatePassword = If( json?.PropertyT("clientCertificatePassword"), out var __jsonClientCertificatePassword) ? (string)__jsonClientCertificatePassword : (string)_clientCertificatePassword;} + {_clientCertificateSendChain = If( json?.PropertyT("clientCertificateSendChain"), out var __jsonClientCertificateSendChain) ? (bool?)__jsonClientCertificateSendChain : _clientCertificateSendChain;} AfterFromJson(json); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.PowerShell.cs new file mode 100644 index 000000000000..607b25fcd383 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.PowerShell.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The SourceControl Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] + public partial class SourceControlConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SourceControlConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SourceControlConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SourceControlConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorType = (string) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorScope = (string) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorScope, global::System.Convert.ToString); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (string) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (string) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SourceControlConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorType = (string) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorScope = (string) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).OperatorScope, global::System.Convert.ToString); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (string) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (string) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The SourceControl Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] + public partial interface ISourceControlConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.TypeConverter.cs index 8ef16d36cf70..1290786ad035 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.cs similarity index 59% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.cs index c564811f1c3f..2ca7055f0a4f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.cs @@ -3,108 +3,135 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The SourceControl Configuration object returned in Get & Put response. public partial class SourceControlConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource(); /// The compliance state of the configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; } + public string ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied = value ?? default(global::System.DateTime); } + public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied; } /// Message from when the configuration was applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage = value ?? null; } + public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage; } /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType)""); } + public string ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel; } /// Name-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Option to enable Helm Operator for this git configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public bool? EnableHelmOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator = value ?? default(bool); } + public bool? EnableHelmOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator = value ?? default(bool); } /// Values override for the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue = value ?? null; } + public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue = value ?? null; } /// Version of the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion = value ?? null; } + public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for ComplianceStatus - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.ComplianceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.ComplianceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus = value; } /// Internal Acessors for ComplianceStatusComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState = value; } + + /// Internal Acessors for ComplianceStatusLastConfigApplied + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied = value; } + + /// Internal Acessors for ComplianceStatusMessage + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage = value; } + + /// Internal Acessors for ComplianceStatusMessageLevel + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel = value; } /// Internal Acessors for HelmOperatorProperty - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.HelmOperatorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.HelmOperatorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for RepositoryPublicKey - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt = value; } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy = value; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType = value; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 0)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Name; } /// Instance name of the operator - identifying the specific configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string OperatorInstanceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName = value ?? null; } + public string OperatorInstanceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName = value ?? null; } /// /// The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period @@ -112,47 +139,47 @@ public partial class SourceControlConfiguration : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string OperatorNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace = value ?? null; } + public string OperatorNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace = value ?? null; } /// Any Parameters for the Operator instance in string format. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string OperatorParam { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam = value ?? null; } + public string OperatorParam { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam = value ?? null; } /// Scope at which the operator will be installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType)""); } + public string OperatorScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope = value ?? null; } /// Type of the operator [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).OperatorType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType)""); } + public string OperatorType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).OperatorType = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties _property; /// Properties to create a Source Control Configuration resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationProperties()); set => this._property = value; } /// The provisioning state of the resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; } /// /// Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; } + public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; } /// Url of the SourceControl Repository. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 1)] - public string RepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl = value ?? null; } + public string RepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] @@ -164,54 +191,54 @@ public partial class SourceControlConfiguration : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string SshKnownHostsContent { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent = value ?? null; } + public string SshKnownHostsContent { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData _systemData; /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public SourceControlConfiguration() @@ -227,59 +254,79 @@ public SourceControlConfiguration() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// The SourceControl Configuration object returned in Get & Put response. public partial interface ISourceControlConfiguration : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResource { /// The compliance state of the configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The compliance state of the configuration.", SerializedName = @"complianceState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Pending", "Compliant", "Noncompliant", "Installed", "Failed")] + string ComplianceStatusComplianceState { get; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Datetime the configuration was last applied.", SerializedName = @"lastConfigApplied", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ComplianceStatusLastConfigApplied { get; set; } + global::System.DateTime? ComplianceStatusLastConfigApplied { get; } /// Message from when the configuration was applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Message from when the configuration was applied.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string ComplianceStatusMessage { get; set; } + string ComplianceStatusMessage { get; } /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Level of the message.", SerializedName = @"messageLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string ComplianceStatusMessageLevel { get; } /// Name-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Option to enable Helm Operator for this git configuration.", SerializedName = @"enableHelmOperator", PossibleTypes = new [] { typeof(bool) })] @@ -288,6 +335,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Values override for the operator Helm chart.", SerializedName = @"chartValues", PossibleTypes = new [] { typeof(string) })] @@ -296,6 +346,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the operator Helm chart.", SerializedName = @"chartVersion", PossibleTypes = new [] { typeof(string) })] @@ -304,6 +357,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Instance name of the operator - identifying the specific configuration.", SerializedName = @"operatorInstanceName", PossibleTypes = new [] { typeof(string) })] @@ -315,6 +371,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", SerializedName = @"operatorNamespace", PossibleTypes = new [] { typeof(string) })] @@ -323,6 +382,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Any Parameters for the Operator instance in string format.", SerializedName = @"operatorParams", PossibleTypes = new [] { typeof(string) })] @@ -331,32 +393,47 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Scope at which the operator will be installed.", SerializedName = @"operatorScope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string OperatorScope { get; set; } /// Type of the operator [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the operator", SerializedName = @"operatorType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + string OperatorType { get; set; } /// The provisioning state of the resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of the resource provider.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Accepted", "Deleting", "Running", "Succeeded", "Failed")] + string ProvisioningState { get; } /// /// Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user).", SerializedName = @"repositoryPublicKey", PossibleTypes = new [] { typeof(string) })] @@ -365,6 +442,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Url of the SourceControl Repository.", SerializedName = @"repositoryUrl", PossibleTypes = new [] { typeof(string) })] @@ -375,6 +455,9 @@ public partial interface ISourceControlConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances", SerializedName = @"sshKnownHostsContents", PossibleTypes = new [] { typeof(string) })] @@ -382,73 +465,95 @@ public partial interface ISourceControlConfiguration : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// The SourceControl Configuration object returned in Get & Put response. internal partial interface ISourceControlConfigurationInternal : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IProxyResourceInternal { /// Compliance Status of the Configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus ComplianceStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus ComplianceStatus { get; set; } /// The compliance state of the configuration. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Pending", "Compliant", "Noncompliant", "Installed", "Failed")] + string ComplianceStatusComplianceState { get; set; } /// Datetime the configuration was last applied. global::System.DateTime? ComplianceStatusLastConfigApplied { get; set; } /// Message from when the configuration was applied. string ComplianceStatusMessage { get; set; } /// Level of the message. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string ComplianceStatusMessageLevel { get; set; } /// Name-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. bool? EnableHelmOperator { get; set; } /// Properties for Helm operator. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties HelmOperatorProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties HelmOperatorProperty { get; set; } /// Values override for the operator Helm chart. string HelmOperatorPropertyChartValue { get; set; } /// Version of the operator Helm chart. @@ -463,13 +568,16 @@ internal partial interface ISourceControlConfigurationInternal : /// Any Parameters for the Operator instance in string format. string OperatorParam { get; set; } /// Scope at which the operator will be installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string OperatorScope { get; set; } /// Type of the operator - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + string OperatorType { get; set; } /// Properties to create a Source Control Configuration resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties Property { get; set; } /// The provisioning state of the resource provider. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Accepted", "Deleting", "Running", "Succeeded", "Failed")] + string ProvisioningState { get; set; } /// /// Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). /// @@ -483,19 +591,21 @@ internal partial interface ISourceControlConfigurationInternal : /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.json.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.json.cs index e3fe999aee91..91526dcc59c4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfiguration.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SourceControlConfiguration partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SourceControlConfiguration(json) : null; } @@ -77,9 +77,9 @@ internal SourceControlConfiguration(Microsoft.Azure.PowerShell.Cmdlets.Kubernete { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -102,9 +102,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.PowerShell.cs similarity index 74% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.PowerShell.cs index 07ff2e9b3d5a..45e7a87ad872 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -66,29 +66,29 @@ public partial class SourceControlConfigurationList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SourceControlConfigurationList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SourceControlConfigurationList(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,17 +116,17 @@ internal SourceControlConfigurationList(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,11 +141,11 @@ internal SourceControlConfigurationList(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfigurationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfigurationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.TypeConverter.cs index 35b8dd71e2b3..241b521e6727 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.cs similarity index 73% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.cs index c1865f3368db..b95a6d0ad1da 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// and a URL link to get the next set of results. /// public partial class SourceControlConfigurationList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationListInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -30,11 +30,11 @@ public partial class SourceControlConfigurationList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[] _value; + private System.Collections.Generic.List _value; /// List of Source Control Configurations within a Kubernetes cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public SourceControlConfigurationList() @@ -51,6 +51,9 @@ public partial interface ISourceControlConfigurationList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of configuration objects, if any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -59,10 +62,13 @@ public partial interface ISourceControlConfigurationList : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Source Control Configurations within a Kubernetes cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration) })] + System.Collections.Generic.List Value { get; } } /// Result of the request to list Source Control Configurations. It contains a list of SourceControlConfiguration objects @@ -73,7 +79,7 @@ internal partial interface ISourceControlConfigurationListInternal /// URL to get the next set of configuration objects, if any. string NextLink { get; set; } /// List of Source Control Configurations within a Kubernetes cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.json.cs similarity index 90% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.json.cs index 59071487e07c..1919690e025c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationList.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class SourceControlConfigurationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SourceControlConfigurationList(json) : null; } @@ -80,8 +80,8 @@ internal SourceControlConfigurationList(Microsoft.Azure.PowerShell.Cmdlets.Kuber { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.ISourceControlConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.PowerShell.cs new file mode 100644 index 000000000000..e363ab70c5c9 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.PowerShell.cs @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties to create a Source Control Configuration resource + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] + public partial class SourceControlConfigurationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SourceControlConfigurationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SourceControlConfigurationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SourceControlConfigurationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (string) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorType, global::System.Convert.ToString); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (string) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, global::System.Convert.ToString); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (string) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (string) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SourceControlConfigurationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (string) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorType, global::System.Convert.ToString); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (string) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, global::System.Convert.ToString); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (string) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (string) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties to create a Source Control Configuration resource + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] + public partial interface ISourceControlConfigurationProperties + + { + + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.TypeConverter.cs index dca635f88db2..a660e9862c26 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.cs similarity index 67% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.cs index b608167bfbf1..dc6ab2787081 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.cs @@ -3,45 +3,45 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties to create a Source Control Configuration resource public partial class SourceControlConfigurationProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus _complianceStatus; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus _complianceStatus; /// Compliance Status of the Configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatus()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatus()); } /// The compliance state of the configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).ComplianceState; } + public string ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).ComplianceState; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied = value ?? default(global::System.DateTime); } + public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied; } /// Message from when the configuration was applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).Message = value ?? null; } + public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).Message; } /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).MessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).MessageLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType)""); } + public string ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).MessageLevel; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings _configurationProtectedSetting; /// Name-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. private bool? _enableHelmOperator; @@ -51,34 +51,43 @@ public partial class SourceControlConfigurationProperties : public bool? EnableHelmOperator { get => this._enableHelmOperator; set => this._enableHelmOperator = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties _helmOperatorProperty; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties _helmOperatorProperty; /// Properties for Helm operator. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorProperties()); set => this._helmOperatorProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorProperties()); set => this._helmOperatorProperty = value; } /// Values override for the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue = value ?? null; } + public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue = value ?? null; } /// Version of the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion = value ?? null; } + public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion = value ?? null; } /// Internal Acessors for ComplianceStatus - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal.ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatus()); set { {_complianceStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatus()); set { {_complianceStatus = value;} } } /// Internal Acessors for ComplianceStatusComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatusInternal)ComplianceStatus).ComplianceState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).ComplianceState = value; } + + /// Internal Acessors for ComplianceStatusLastConfigApplied + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied = value; } + + /// Internal Acessors for ComplianceStatusMessage + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).Message = value; } + + /// Internal Acessors for ComplianceStatusMessageLevel + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).MessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatusInternal)ComplianceStatus).MessageLevel = value; } /// Internal Acessors for HelmOperatorProperty - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal.HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorProperties()); set { {_helmOperatorProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorProperties()); set { {_helmOperatorProperty = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for RepositoryPublicKey - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } /// Backing field for property. private string _operatorInstanceName; @@ -105,25 +114,25 @@ public partial class SourceControlConfigurationProperties : public string OperatorParam { get => this._operatorParam; set => this._operatorParam = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? _operatorScope; + private string _operatorScope; /// Scope at which the operator will be installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get => this._operatorScope; set => this._operatorScope = value; } + public string OperatorScope { get => this._operatorScope; set => this._operatorScope = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? _operatorType; + private string _operatorType; /// Type of the operator [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get => this._operatorType; set => this._operatorType = value; } + public string OperatorType { get => this._operatorType; set => this._operatorType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? _provisioningState; + private string _provisioningState; /// The provisioning state of the resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _repositoryPublicKey; @@ -164,46 +173,66 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The compliance state of the configuration.", SerializedName = @"complianceState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Pending", "Compliant", "Noncompliant", "Installed", "Failed")] + string ComplianceStatusComplianceState { get; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Datetime the configuration was last applied.", SerializedName = @"lastConfigApplied", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ComplianceStatusLastConfigApplied { get; set; } + global::System.DateTime? ComplianceStatusLastConfigApplied { get; } /// Message from when the configuration was applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Message from when the configuration was applied.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string ComplianceStatusMessage { get; set; } + string ComplianceStatusMessage { get; } /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Level of the message.", SerializedName = @"messageLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string ComplianceStatusMessageLevel { get; } /// Name-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Option to enable Helm Operator for this git configuration.", SerializedName = @"enableHelmOperator", PossibleTypes = new [] { typeof(bool) })] @@ -212,6 +241,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Values override for the operator Helm chart.", SerializedName = @"chartValues", PossibleTypes = new [] { typeof(string) })] @@ -220,6 +252,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version of the operator Helm chart.", SerializedName = @"chartVersion", PossibleTypes = new [] { typeof(string) })] @@ -228,6 +263,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Instance name of the operator - identifying the specific configuration.", SerializedName = @"operatorInstanceName", PossibleTypes = new [] { typeof(string) })] @@ -239,6 +277,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", SerializedName = @"operatorNamespace", PossibleTypes = new [] { typeof(string) })] @@ -247,6 +288,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Any Parameters for the Operator instance in string format.", SerializedName = @"operatorParams", PossibleTypes = new [] { typeof(string) })] @@ -255,32 +299,47 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Scope at which the operator will be installed.", SerializedName = @"operatorScope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string OperatorScope { get; set; } /// Type of the operator [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the operator", SerializedName = @"operatorType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + string OperatorType { get; set; } /// The provisioning state of the resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of the resource provider.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Accepted", "Deleting", "Running", "Succeeded", "Failed")] + string ProvisioningState { get; } /// /// Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user).", SerializedName = @"repositoryPublicKey", PossibleTypes = new [] { typeof(string) })] @@ -289,6 +348,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Url of the SourceControl Repository.", SerializedName = @"repositoryUrl", PossibleTypes = new [] { typeof(string) })] @@ -299,6 +361,9 @@ public partial interface ISourceControlConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances", SerializedName = @"sshKnownHostsContents", PossibleTypes = new [] { typeof(string) })] @@ -310,21 +375,23 @@ internal partial interface ISourceControlConfigurationPropertiesInternal { /// Compliance Status of the Configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IComplianceStatus ComplianceStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IComplianceStatus ComplianceStatus { get; set; } /// The compliance state of the configuration. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Pending", "Compliant", "Noncompliant", "Installed", "Failed")] + string ComplianceStatusComplianceState { get; set; } /// Datetime the configuration was last applied. global::System.DateTime? ComplianceStatusLastConfigApplied { get; set; } /// Message from when the configuration was applied. string ComplianceStatusMessage { get; set; } /// Level of the message. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Error", "Warning", "Information")] + string ComplianceStatusMessageLevel { get; set; } /// Name-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. bool? EnableHelmOperator { get; set; } /// Properties for Helm operator. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IHelmOperatorProperties HelmOperatorProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IHelmOperatorProperties HelmOperatorProperty { get; set; } /// Values override for the operator Helm chart. string HelmOperatorPropertyChartValue { get; set; } /// Version of the operator Helm chart. @@ -339,11 +406,14 @@ internal partial interface ISourceControlConfigurationPropertiesInternal /// Any Parameters for the Operator instance in string format. string OperatorParam { get; set; } /// Scope at which the operator will be installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + string OperatorScope { get; set; } /// Type of the operator - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + string OperatorType { get; set; } /// The provisioning state of the resource provider. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Accepted", "Deleting", "Running", "Succeeded", "Failed")] + string ProvisioningState { get; set; } /// /// Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). /// diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.json.cs similarity index 91% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.json.cs index 0f5ac5e3c336..3bf37135dc4f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20221101/SourceControlConfigurationProperties.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SourceControlConfigurationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SourceControlConfigurationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SourceControlConfigurationProperties(json) : null; } @@ -77,19 +77,19 @@ internal SourceControlConfigurationProperties(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_helmOperatorProperty = If( json?.PropertyT("helmOperatorProperties"), out var __jsonHelmOperatorProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.HelmOperatorProperties.FromJson(__jsonHelmOperatorProperties) : HelmOperatorProperty;} - {_complianceStatus = If( json?.PropertyT("complianceStatus"), out var __jsonComplianceStatus) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ComplianceStatus.FromJson(__jsonComplianceStatus) : ComplianceStatus;} - {_repositoryUrl = If( json?.PropertyT("repositoryUrl"), out var __jsonRepositoryUrl) ? (string)__jsonRepositoryUrl : (string)RepositoryUrl;} - {_operatorNamespace = If( json?.PropertyT("operatorNamespace"), out var __jsonOperatorNamespace) ? (string)__jsonOperatorNamespace : (string)OperatorNamespace;} - {_operatorInstanceName = If( json?.PropertyT("operatorInstanceName"), out var __jsonOperatorInstanceName) ? (string)__jsonOperatorInstanceName : (string)OperatorInstanceName;} - {_operatorType = If( json?.PropertyT("operatorType"), out var __jsonOperatorType) ? (string)__jsonOperatorType : (string)OperatorType;} - {_operatorParam = If( json?.PropertyT("operatorParams"), out var __jsonOperatorParams) ? (string)__jsonOperatorParams : (string)OperatorParam;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} - {_operatorScope = If( json?.PropertyT("operatorScope"), out var __jsonOperatorScope) ? (string)__jsonOperatorScope : (string)OperatorScope;} - {_repositoryPublicKey = If( json?.PropertyT("repositoryPublicKey"), out var __jsonRepositoryPublicKey) ? (string)__jsonRepositoryPublicKey : (string)RepositoryPublicKey;} - {_sshKnownHostsContent = If( json?.PropertyT("sshKnownHostsContents"), out var __jsonSshKnownHostsContents) ? (string)__jsonSshKnownHostsContents : (string)SshKnownHostsContent;} - {_enableHelmOperator = If( json?.PropertyT("enableHelmOperator"), out var __jsonEnableHelmOperator) ? (bool?)__jsonEnableHelmOperator : EnableHelmOperator;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_helmOperatorProperty = If( json?.PropertyT("helmOperatorProperties"), out var __jsonHelmOperatorProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.HelmOperatorProperties.FromJson(__jsonHelmOperatorProperties) : _helmOperatorProperty;} + {_complianceStatus = If( json?.PropertyT("complianceStatus"), out var __jsonComplianceStatus) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ComplianceStatus.FromJson(__jsonComplianceStatus) : _complianceStatus;} + {_repositoryUrl = If( json?.PropertyT("repositoryUrl"), out var __jsonRepositoryUrl) ? (string)__jsonRepositoryUrl : (string)_repositoryUrl;} + {_operatorNamespace = If( json?.PropertyT("operatorNamespace"), out var __jsonOperatorNamespace) ? (string)__jsonOperatorNamespace : (string)_operatorNamespace;} + {_operatorInstanceName = If( json?.PropertyT("operatorInstanceName"), out var __jsonOperatorInstanceName) ? (string)__jsonOperatorInstanceName : (string)_operatorInstanceName;} + {_operatorType = If( json?.PropertyT("operatorType"), out var __jsonOperatorType) ? (string)__jsonOperatorType : (string)_operatorType;} + {_operatorParam = If( json?.PropertyT("operatorParams"), out var __jsonOperatorParams) ? (string)__jsonOperatorParams : (string)_operatorParam;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : _configurationProtectedSetting;} + {_operatorScope = If( json?.PropertyT("operatorScope"), out var __jsonOperatorScope) ? (string)__jsonOperatorScope : (string)_operatorScope;} + {_repositoryPublicKey = If( json?.PropertyT("repositoryPublicKey"), out var __jsonRepositoryPublicKey) ? (string)__jsonRepositoryPublicKey : (string)_repositoryPublicKey;} + {_sshKnownHostsContent = If( json?.PropertyT("sshKnownHostsContents"), out var __jsonSshKnownHostsContents) ? (string)__jsonSshKnownHostsContents : (string)_sshKnownHostsContent;} + {_enableHelmOperator = If( json?.PropertyT("enableHelmOperator"), out var __jsonEnableHelmOperator) ? (bool?)__jsonEnableHelmOperator : _enableHelmOperator;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -114,7 +114,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J return container; } AddIf( null != this._helmOperatorProperty ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._helmOperatorProperty.ToJson(null,serializationMode) : null, "helmOperatorProperties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._complianceStatus ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._complianceStatus.ToJson(null,serializationMode) : null, "complianceStatus" ,container.Add ); } @@ -125,13 +125,13 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J AddIf( null != (((object)this._operatorParam)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._operatorParam.ToString()) : null, "operatorParams" ,container.Add ); AddIf( null != this._configurationProtectedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationProtectedSetting.ToJson(null,serializationMode) : null, "configurationProtectedSettings" ,container.Add ); AddIf( null != (((object)this._operatorScope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._operatorScope.ToString()) : null, "operatorScope" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._repositoryPublicKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._repositoryPublicKey.ToString()) : null, "repositoryPublicKey" ,container.Add ); } AddIf( null != (((object)this._sshKnownHostsContent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sshKnownHostsContent.ToString()) : null, "sshKnownHostsContents" ,container.Add ); AddIf( null != this._enableHelmOperator ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._enableHelmOperator) : null, "enableHelmOperator" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.PowerShell.cs similarity index 64% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.PowerShell.cs index 6ed9cc2dd781..50b1b1b3022c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SystemData partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemData(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal SystemData(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.TypeConverter.cs similarity index 97% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.TypeConverter.cs index 10e52523c986..4aaaf176ad75 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.cs similarity index 80% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.cs index e51f4d5066d9..707338963f28 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Metadata pertaining to creation and last modification of the resource. public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType? _createdByType; + private string _createdByType; /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType? _lastModifiedByType; + private string _lastModifiedByType; /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } /// Creates an new instance. public SystemData() @@ -69,6 +69,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? CreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource last modification (UTC)", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -101,6 +114,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? LastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType? CreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource last modification (UTC) global::System.DateTime? LastModifiedAt { get; set; } /// The identity that last modified the resource. string LastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? LastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.json.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.json.cs similarity index 94% rename from generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.json.cs rename to generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/SystemData.json.cs index de0957bc8da1..88c89358535c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Models/Api20/SystemData.json.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SystemData(json) : null; } @@ -77,12 +77,12 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.R { 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.Completer.cs deleted file mode 100644 index 43ffdfac1800..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.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.KubernetesConfiguration.Support -{ - - /// The identity type. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityTypeTypeConverter))] - public partial struct AksIdentityType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UserAssigned'", "UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserAssigned"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.TypeConverter.cs deleted file mode 100644 index 4f00de868d22..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.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.KubernetesConfiguration.Support -{ - - /// The identity type. - public partial class AksIdentityTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AksIdentityType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.cs deleted file mode 100644 index 5a77e32534c2..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/AksIdentityType.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.KubernetesConfiguration.Support -{ - - /// The identity type. - public partial struct AksIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType SystemAssigned = @"SystemAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType UserAssigned = @"UserAssigned"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private AksIdentityType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AksIdentityType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AksIdentityType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AksIdentityType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AksIdentityType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is AksIdentityType && Equals((AksIdentityType)obj); - } - - /// Returns hashCode for enum AksIdentityType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AksIdentityType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AksIdentityType - /// the value to convert to an instance of . - - public static implicit operator AksIdentityType(string value) - { - return new AksIdentityType(value); - } - - /// Implicit operator to convert AksIdentityType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e) - { - return e._value; - } - - /// Overriding != operator for enum AksIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AksIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.Completer.cs deleted file mode 100644 index b9dd733719e3..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.Completer.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// The compliance state of the configuration. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateTypeTypeConverter))] - public partial struct ComplianceStateType : - 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) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Compliant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Compliant'", "Compliant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Compliant"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Noncompliant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Noncompliant'", "Noncompliant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Noncompliant"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Installed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Installed'", "Installed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Installed"); - } - 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"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.TypeConverter.cs deleted file mode 100644 index b8ac1647a45e..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.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.KubernetesConfiguration.Support -{ - - /// The compliance state of the configuration. - public partial class ComplianceStateTypeTypeConverter : - 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) => ComplianceStateType.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.cs deleted file mode 100644 index c90a283523e8..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ComplianceStateType.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// The compliance state of the configuration. - public partial struct ComplianceStateType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType Compliant = @"Compliant"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType Installed = @"Installed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType Noncompliant = @"Noncompliant"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType Pending = @"Pending"; - - /// 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 ComplianceStateType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ComplianceStateType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ComplianceStateType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ComplianceStateType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ComplianceStateType (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 ComplianceStateType && Equals((ComplianceStateType)obj); - } - - /// Returns hashCode for enum ComplianceStateType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ComplianceStateType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ComplianceStateType - /// the value to convert to an instance of . - - public static implicit operator ComplianceStateType(string value) - { - return new ComplianceStateType(value); - } - - /// Implicit operator to convert ComplianceStateType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e) - { - return e._value; - } - - /// Overriding != operator for enum ComplianceStateType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ComplianceStateType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/CreatedByType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index 6c8cecfa7af9..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index e88f2fc6c091..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/CreatedByType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index 1dfd308effef..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.Completer.cs deleted file mode 100644 index eafc276daccf..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.Completer.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// Compliance state of the cluster object. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceStateTypeConverter))] - public partial struct FluxComplianceState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Compliant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Compliant'", "Compliant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Compliant"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Non-Compliant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Non-Compliant'", "Non-Compliant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Non-Compliant"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Suspended".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Suspended'", "Suspended", global::System.Management.Automation.CompletionResultType.ParameterValue, "Suspended"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.TypeConverter.cs deleted file mode 100644 index eca2ab598cb1..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.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.KubernetesConfiguration.Support -{ - - /// Compliance state of the cluster object. - public partial class FluxComplianceStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => FluxComplianceState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.cs deleted file mode 100644 index 887d93faa559..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/FluxComplianceState.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// Compliance state of the cluster object. - public partial struct FluxComplianceState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Compliant = @"Compliant"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState NonCompliant = @"Non-Compliant"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Pending = @"Pending"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Suspended = @"Suspended"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Unknown = @"Unknown"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to FluxComplianceState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new FluxComplianceState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type FluxComplianceState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type FluxComplianceState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is FluxComplianceState && Equals((FluxComplianceState)obj); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private FluxComplianceState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns hashCode for enum FluxComplianceState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for FluxComplianceState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to FluxComplianceState - /// the value to convert to an instance of . - - public static implicit operator FluxComplianceState(string value) - { - return new FluxComplianceState(value); - } - - /// Implicit operator to convert FluxComplianceState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e) - { - return e._value; - } - - /// Overriding != operator for enum FluxComplianceState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum FluxComplianceState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.Completer.cs deleted file mode 100644 index ba1818327087..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// - /// Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationTypeTypeConverter))] - public partial struct KustomizationValidationType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "none".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'none'", "none", global::System.Management.Automation.CompletionResultType.ParameterValue, "none"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "client".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'client'", "client", global::System.Management.Automation.CompletionResultType.ParameterValue, "client"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "server".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'server'", "server", global::System.Management.Automation.CompletionResultType.ParameterValue, "server"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.TypeConverter.cs deleted file mode 100644 index c1bc044ead3f..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.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.KubernetesConfiguration.Support -{ - - /// - /// Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster. - /// - public partial class KustomizationValidationTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KustomizationValidationType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.cs deleted file mode 100644 index 12126640cbb0..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/KustomizationValidationType.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// - /// Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster. - /// - public partial struct KustomizationValidationType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType Client = @"client"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType None = @"none"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType Server = @"server"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to KustomizationValidationType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new KustomizationValidationType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type KustomizationValidationType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type KustomizationValidationType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is KustomizationValidationType && Equals((KustomizationValidationType)obj); - } - - /// Returns hashCode for enum KustomizationValidationType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private KustomizationValidationType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for KustomizationValidationType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to KustomizationValidationType - /// the value to convert to an instance of . - - public static implicit operator KustomizationValidationType(string value) - { - return new KustomizationValidationType(value); - } - - /// Implicit operator to convert KustomizationValidationType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e) - { - return e._value; - } - - /// Overriding != operator for enum KustomizationValidationType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum KustomizationValidationType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.Completer.cs deleted file mode 100644 index aff790f991eb..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.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.KubernetesConfiguration.Support -{ - - /// Level of the status. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelTypeTypeConverter))] - public partial struct LevelType : - 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) || "Error".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Error'", "Error", global::System.Management.Automation.CompletionResultType.ParameterValue, "Error"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Warning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Warning'", "Warning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Warning"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Information".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Information'", "Information", global::System.Management.Automation.CompletionResultType.ParameterValue, "Information"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.TypeConverter.cs deleted file mode 100644 index 61388bbc07fb..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.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.KubernetesConfiguration.Support -{ - - /// Level of the status. - public partial class LevelTypeTypeConverter : - 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) => LevelType.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.cs deleted file mode 100644 index b87d66965ff8..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/LevelType.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.KubernetesConfiguration.Support -{ - - /// Level of the status. - public partial struct LevelType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType Error = @"Error"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType Information = @"Information"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType Warning = @"Warning"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to LevelType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new LevelType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type LevelType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type LevelType (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 LevelType && Equals((LevelType)obj); - } - - /// Returns hashCode for enum LevelType - /// 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 LevelType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for LevelType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to LevelType - /// the value to convert to an instance of . - - public static implicit operator LevelType(string value) - { - return new LevelType(value); - } - - /// Implicit operator to convert LevelType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e) - { - return e._value; - } - - /// Overriding != operator for enum LevelType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum LevelType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.Completer.cs deleted file mode 100644 index 61c1c2df5814..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.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.KubernetesConfiguration.Support -{ - - /// Level of the message. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelTypeTypeConverter))] - public partial struct MessageLevelType : - 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) || "Error".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Error'", "Error", global::System.Management.Automation.CompletionResultType.ParameterValue, "Error"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Warning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Warning'", "Warning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Warning"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Information".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Information'", "Information", global::System.Management.Automation.CompletionResultType.ParameterValue, "Information"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.TypeConverter.cs deleted file mode 100644 index 63f2c70f3a12..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.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.KubernetesConfiguration.Support -{ - - /// Level of the message. - public partial class MessageLevelTypeTypeConverter : - 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) => MessageLevelType.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.cs deleted file mode 100644 index 477de7d36eb8..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/MessageLevelType.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.KubernetesConfiguration.Support -{ - - /// Level of the message. - public partial struct MessageLevelType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType Error = @"Error"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType Information = @"Information"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType Warning = @"Warning"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to MessageLevelType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new MessageLevelType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type MessageLevelType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type MessageLevelType (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 MessageLevelType && Equals((MessageLevelType)obj); - } - - /// Returns hashCode for enum MessageLevelType - /// 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 MessageLevelType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for MessageLevelType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to MessageLevelType - /// the value to convert to an instance of . - - public static implicit operator MessageLevelType(string value) - { - return new MessageLevelType(value); - } - - /// Implicit operator to convert MessageLevelType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e) - { - return e._value; - } - - /// Overriding != operator for enum MessageLevelType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum MessageLevelType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.Completer.cs deleted file mode 100644 index fc80c46ab027..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.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.KubernetesConfiguration.Support -{ - - /// Scope at which the operator will be installed. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeTypeTypeConverter))] - public partial struct OperatorScopeType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "cluster".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'cluster'", "cluster", global::System.Management.Automation.CompletionResultType.ParameterValue, "cluster"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "namespace".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'namespace'", "namespace", global::System.Management.Automation.CompletionResultType.ParameterValue, "namespace"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.TypeConverter.cs deleted file mode 100644 index 4e35b7cbd2f5..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.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.KubernetesConfiguration.Support -{ - - /// Scope at which the operator will be installed. - public partial class OperatorScopeTypeTypeConverter : - 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) => OperatorScopeType.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.cs deleted file mode 100644 index 6a7d4f710ea8..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorScopeType.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.KubernetesConfiguration.Support -{ - - /// Scope at which the operator will be installed. - public partial struct OperatorScopeType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType Cluster = @"cluster"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType Namespace = @"namespace"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to OperatorScopeType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new OperatorScopeType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type OperatorScopeType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type OperatorScopeType (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 OperatorScopeType && Equals((OperatorScopeType)obj); - } - - /// Returns hashCode for enum OperatorScopeType - /// 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 OperatorScopeType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for OperatorScopeType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to OperatorScopeType - /// the value to convert to an instance of . - - public static implicit operator OperatorScopeType(string value) - { - return new OperatorScopeType(value); - } - - /// Implicit operator to convert OperatorScopeType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e) - { - return e._value; - } - - /// Overriding != operator for enum OperatorScopeType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum OperatorScopeType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.Completer.cs deleted file mode 100644 index 4d9a6eb04e95..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.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.KubernetesConfiguration.Support -{ - - /// Type of the operator - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorTypeTypeConverter))] - public partial struct OperatorType : - 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) || "Flux".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Flux'", "Flux", global::System.Management.Automation.CompletionResultType.ParameterValue, "Flux"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.TypeConverter.cs deleted file mode 100644 index 5e88f1f19a89..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.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.KubernetesConfiguration.Support -{ - - /// Type of the operator - public partial class OperatorTypeTypeConverter : - 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) => OperatorType.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.cs deleted file mode 100644 index 2857227378b5..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/OperatorType.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.KubernetesConfiguration.Support -{ - - /// Type of the operator - public partial struct OperatorType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType Flux = @"Flux"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to OperatorType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new OperatorType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type OperatorType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type OperatorType (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 OperatorType && Equals((OperatorType)obj); - } - - /// Returns hashCode for enum OperatorType - /// 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 OperatorType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for OperatorType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to OperatorType - /// the value to convert to an instance of . - - public static implicit operator OperatorType(string value) - { - return new OperatorType(value); - } - - /// Implicit operator to convert OperatorType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e) - { - return e._value; - } - - /// Overriding != operator for enum OperatorType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum OperatorType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.Completer.cs deleted file mode 100644 index 7aa1a17de060..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.Completer.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// The provisioning state of the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateTypeConverter))] - public partial struct ProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// 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) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - 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"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs deleted file mode 100644 index 132ba6a6736d..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Support -{ - - /// The provisioning state of the resource. - public partial class ProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.cs deleted file mode 100644 index 1cedb85372d9..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningState.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// The provisioning state of the resource. - public partial struct ProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState Succeeded = @"Succeeded"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.Completer.cs deleted file mode 100644 index 3e85416214f8..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.Completer.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// The provisioning state of the resource provider. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateTypeTypeConverter))] - public partial struct ProvisioningStateType : - 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) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Accepted'", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted"); - } - 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) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.TypeConverter.cs deleted file mode 100644 index e3d9e9118411..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.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.KubernetesConfiguration.Support -{ - - /// The provisioning state of the resource provider. - public partial class ProvisioningStateTypeTypeConverter : - 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) => ProvisioningStateType.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.cs deleted file mode 100644 index f03248d36fea..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ProvisioningStateType.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support -{ - - /// The provisioning state of the resource provider. - public partial struct ProvisioningStateType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType Accepted = @"Accepted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType Running = @"Running"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningStateType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningStateType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningStateType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningStateType (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 ProvisioningStateType && Equals((ProvisioningStateType)obj); - } - - /// Returns hashCode for enum ProvisioningStateType - /// 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 ProvisioningStateType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningStateType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningStateType - /// the value to convert to an instance of . - - public static implicit operator ProvisioningStateType(string value) - { - return new ProvisioningStateType(value); - } - - /// Implicit operator to convert ProvisioningStateType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningStateType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningStateType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs deleted file mode 100644 index 81b6c5bc2cf6..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.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.KubernetesConfiguration.Support -{ - - /// The identity type. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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) || "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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs deleted file mode 100644 index 4de8b162e663..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.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.KubernetesConfiguration.Support -{ - - /// The identity type. - 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.cs deleted file mode 100644 index 242b162de6f0..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ResourceIdentityType.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.KubernetesConfiguration.Support -{ - - /// The identity type. - public partial struct ResourceIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.Completer.cs deleted file mode 100644 index c6e28714a1f2..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.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.KubernetesConfiguration.Support -{ - - /// Scope at which the configuration will be installed. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeTypeTypeConverter))] - public partial struct ScopeType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "cluster".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'cluster'", "cluster", global::System.Management.Automation.CompletionResultType.ParameterValue, "cluster"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "namespace".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'namespace'", "namespace", global::System.Management.Automation.CompletionResultType.ParameterValue, "namespace"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.TypeConverter.cs deleted file mode 100644 index 986f86229635..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.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.KubernetesConfiguration.Support -{ - - /// Scope at which the configuration will be installed. - public partial class ScopeTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ScopeType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.cs deleted file mode 100644 index cd8d6362764f..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/ScopeType.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.KubernetesConfiguration.Support -{ - - /// Scope at which the configuration will be installed. - public partial struct ScopeType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Cluster = @"cluster"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Namespace = @"namespace"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ScopeType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ScopeType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ScopeType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ScopeType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ScopeType && Equals((ScopeType)obj); - } - - /// Returns hashCode for enum ScopeType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ScopeType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ScopeType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ScopeType - /// the value to convert to an instance of . - - public static implicit operator ScopeType(string value) - { - return new ScopeType(value); - } - - /// Implicit operator to convert ScopeType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e) - { - return e._value; - } - - /// Overriding != operator for enum ScopeType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ScopeType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.Completer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.Completer.cs deleted file mode 100644 index 8f7e691db369..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.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.KubernetesConfiguration.Support -{ - - /// Source Kind to pull the configuration data from. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindTypeTypeConverter))] - public partial struct SourceKindType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "GitRepository".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'GitRepository'", "GitRepository", global::System.Management.Automation.CompletionResultType.ParameterValue, "GitRepository"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Bucket".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Bucket'", "Bucket", global::System.Management.Automation.CompletionResultType.ParameterValue, "Bucket"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureBlob".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AzureBlob'", "AzureBlob", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureBlob"); - } - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.TypeConverter.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.TypeConverter.cs deleted file mode 100644 index 55e841443b19..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.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.KubernetesConfiguration.Support -{ - - /// Source Kind to pull the configuration data from. - public partial class SourceKindTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SourceKindType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.cs deleted file mode 100644 index fd99b7e1f8ec..000000000000 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/api/Support/SourceKindType.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.KubernetesConfiguration.Support -{ - - /// Source Kind to pull the configuration data from. - public partial struct SourceKindType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType AzureBlob = @"AzureBlob"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType Bucket = @"Bucket"; - - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType GitRepository = @"GitRepository"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SourceKindType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SourceKindType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SourceKindType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SourceKindType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SourceKindType && Equals((SourceKindType)obj); - } - - /// Returns hashCode for enum SourceKindType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SourceKindType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SourceKindType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SourceKindType - /// the value to convert to an instance of . - - public static implicit operator SourceKindType(string value) - { - return new SourceKindType(value); - } - - /// Implicit operator to convert SourceKindType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e) - { - return e._value; - } - - /// Overriding != operator for enum SourceKindType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SourceKindType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs index 34eebc82f76b..bf95191a6b54 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Get Async Operation status @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigFluxOperationStatus_Get")] [global::System.Management.Automation.Alias("Get-AzK8sConfigFluxOperationStatus")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Get Async Operation status")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfigFluxOperationStatus_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfigFluxOperationStatus_Get : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -104,6 +122,9 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_Get : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. private string _fluxConfigurationName; @@ -158,7 +179,7 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_Get : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -204,7 +225,8 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_Get : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -213,24 +235,24 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_Get : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -253,6 +275,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -274,7 +301,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfigFluxOperationStatus_Get() { @@ -325,8 +352,33 @@ public GetAzKubernetesConfigFluxOperationStatus_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -379,7 +431,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -400,7 +452,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,FluxConfigurationName=FluxConfigurationName,OperationId=OperationId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,FluxConfigurationName=FluxConfigurationName,OperationId=OperationId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -438,12 +490,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -460,15 +512,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, FluxConfigurationName=FluxConfigurationName, OperationId=OperationId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, FluxConfigurationName=FluxConfigurationName, OperationId=OperationId }) + 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 } }); @@ -478,12 +530,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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -495,8 +547,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs index db48b024d89c..55268ef8338b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Get Async Operation status @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigFluxOperationStatus_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzK8sConfigFluxOperationStatus")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Get Async Operation status")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity : g /// 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity : g [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity : g /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzKubernetesConfigFluxOperationStatus_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,7 +382,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -369,12 +420,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,7 +442,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -409,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,8 +477,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration.cs new file mode 100644 index 000000000000..5735cff4986c --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// Get Async Operation status + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration")] + [global::System.Management.Automation.Alias("Get-AzK8sConfigFluxOperationStatus")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Get Async Operation status")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}", ApiVersion = "2022-11-01")] + public partial class GetAzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity _fluxConfigurationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity FluxConfigurationInputObject { get => this._fluxConfigurationInputObject; set => this._fluxConfigurationInputObject = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _operationId; + + /// operation Id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "operation Id")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"operation Id", + SerializedName = @"operationId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string OperationId { get => this._operationId; set => this._operationId = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (FluxConfigurationInputObject?.Id != null) + { + this.FluxConfigurationInputObject.Id += $"/operations/{(global::System.Uri.EscapeDataString(this.OperationId.ToString()))}"; + await this.Client.FluxConfigOperationStatusGetViaIdentity(FluxConfigurationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == FluxConfigurationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FluxConfigurationInputObject has null value for FluxConfigurationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FluxConfigurationInputObject) ); + } + if (null == FluxConfigurationInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FluxConfigurationInputObject has null value for FluxConfigurationInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FluxConfigurationInputObject) ); + } + if (null == FluxConfigurationInputObject.ClusterRp) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FluxConfigurationInputObject has null value for FluxConfigurationInputObject.ClusterRp"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FluxConfigurationInputObject) ); + } + if (null == FluxConfigurationInputObject.ClusterResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FluxConfigurationInputObject has null value for FluxConfigurationInputObject.ClusterResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FluxConfigurationInputObject) ); + } + if (null == FluxConfigurationInputObject.ClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FluxConfigurationInputObject has null value for FluxConfigurationInputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FluxConfigurationInputObject) ); + } + if (null == FluxConfigurationInputObject.FluxConfigurationName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("FluxConfigurationInputObject has null value for FluxConfigurationInputObject.FluxConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, FluxConfigurationInputObject) ); + } + await this.Client.FluxConfigOperationStatusGet(FluxConfigurationInputObject.SubscriptionId ?? null, FluxConfigurationInputObject.ResourceGroupName ?? null, FluxConfigurationInputObject.ClusterRp ?? null, FluxConfigurationInputObject.ClusterResourceName ?? null, FluxConfigurationInputObject.ClusterName ?? null, FluxConfigurationInputObject.FluxConfigurationName ?? null, OperationId, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { OperationId=OperationId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs index 924af7e59634..f6206c495012 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Gets details of the Flux Configuration. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigurationFlux_Get")] [global::System.Management.Automation.Alias("Get-AzK8sConfigurationFlux")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Flux Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfigurationFlux_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfigurationFlux_Get : global::System.Manag /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -104,6 +122,9 @@ public partial class GetAzKubernetesConfigurationFlux_Get : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -145,7 +166,7 @@ public partial class GetAzKubernetesConfigurationFlux_Get : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -191,7 +212,8 @@ public partial class GetAzKubernetesConfigurationFlux_Get : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -200,24 +222,24 @@ public partial class GetAzKubernetesConfigurationFlux_Get : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -240,6 +262,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -261,7 +288,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfigurationFlux_Get() { @@ -312,8 +339,33 @@ public GetAzKubernetesConfigurationFlux_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -366,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -387,7 +439,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -425,12 +477,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -447,15 +499,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -465,12 +517,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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,8 +534,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs index 30c91f9574ea..c62ce7f9ec03 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Gets details of the Flux Configuration. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigurationFlux_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzK8sConfigurationFlux")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Flux Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfigurationFlux_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfigurationFlux_GetViaIdentity : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzKubernetesConfigurationFlux_GetViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class GetAzKubernetesConfigurationFlux_GetViaIdentity : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzKubernetesConfigurationFlux_GetViaIdentity : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfigurationFlux_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzKubernetesConfigurationFlux_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -327,7 +378,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -365,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -387,7 +438,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -405,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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,8 +473,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs index e59d49ac10aa..1f808bcad6b7 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// List all Flux Configurations. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigurationFlux_List")] [global::System.Management.Automation.Alias("Get-AzK8sConfigurationFlux")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all Flux Configurations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfigurationFlux_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,17 +39,32 @@ public partial class GetAzKubernetesConfigurationFlux_List : 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -110,6 +128,9 @@ public partial class GetAzKubernetesConfigurationFlux_List : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -136,7 +157,7 @@ public partial class GetAzKubernetesConfigurationFlux_List : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -182,7 +203,8 @@ public partial class GetAzKubernetesConfigurationFlux_List : global::System.Mana [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -191,24 +213,24 @@ public partial class GetAzKubernetesConfigurationFlux_List : 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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -231,6 +253,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -252,7 +279,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfigurationFlux_List() { @@ -303,8 +330,33 @@ public GetAzKubernetesConfigurationFlux_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -357,7 +409,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -378,7 +430,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -416,12 +468,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -438,15 +490,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, 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 } }); @@ -456,12 +508,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.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationsList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,15 +525,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationsList + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs index d9d8ec3d5fac..1386e5c8e2fa 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Gets details of the Source Control Configuration. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfiguration_Get")] [global::System.Management.Automation.Alias("Get-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Source Control Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfiguration_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfiguration_Get : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -104,6 +122,9 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -145,7 +166,7 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -191,7 +212,8 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -200,24 +222,24 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -240,6 +262,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -261,7 +288,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfiguration_Get() { @@ -312,8 +339,33 @@ public GetAzKubernetesConfiguration_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -366,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -387,7 +439,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -425,12 +477,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -447,15 +499,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -465,12 +517,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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,8 +534,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs index a13186587d4f..c6f83f10047e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Gets details of the Source Control Configuration. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfiguration_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Source Control Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesConfiguration_GetViaIdentity : 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfiguration_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzKubernetesConfiguration_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -327,7 +378,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -365,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -387,7 +438,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -405,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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,8 +473,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_List.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_List.cs index 88447f7b41dc..19bc93a81ee5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_List.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesConfiguration_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// List all Source Control Configurations. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfiguration_List")] [global::System.Management.Automation.Alias("Get-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all Source Control Configurations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesConfiguration_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,17 +39,32 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -110,6 +128,9 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -136,7 +157,7 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -182,7 +203,8 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -191,24 +213,24 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -231,6 +253,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -252,7 +279,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesConfiguration_List() { @@ -303,8 +330,33 @@ public GetAzKubernetesConfiguration_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -357,7 +409,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -378,7 +430,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -416,12 +468,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -438,15 +490,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, 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 } }); @@ -456,12 +508,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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfigurationList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,15 +525,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfigurationList + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_Get.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_Get.cs index 0f78f3135869..52ebcd2a9332 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_Get.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Gets Kubernetes Cluster Extension. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesExtension_Get")] [global::System.Management.Automation.Alias("Get-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesExtension_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesExtension_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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -104,6 +122,9 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -145,7 +166,7 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -191,7 +212,8 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -200,24 +222,24 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -240,6 +262,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -261,7 +288,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesExtension_Get() { @@ -312,8 +339,33 @@ public GetAzKubernetesExtension_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -366,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -387,7 +439,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -425,12 +477,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -447,15 +499,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -465,12 +517,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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,8 +534,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs index c9857a803195..3b83fa5941f4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Gets Kubernetes Cluster Extension. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesExtension_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 GetAzKubernetesExtension_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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesExtension_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzKubernetesExtension_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -327,7 +378,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -365,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -387,7 +438,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -405,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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,8 +473,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_List.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_List.cs index 761d800e0382..76d4db9f3248 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_List.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzKubernetesExtension_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// List all Extensions in the cluster. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesExtension_List")] [global::System.Management.Automation.Alias("Get-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all Extensions in the cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions", ApiVersion = "2022-11-01")] public partial class GetAzKubernetesExtension_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,17 +39,32 @@ public partial class GetAzKubernetesExtension_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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -110,6 +128,9 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -136,7 +157,7 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -182,7 +203,8 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -191,24 +213,24 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtensionsList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -231,6 +253,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -252,7 +279,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzKubernetesExtension_List() { @@ -303,8 +330,33 @@ public GetAzKubernetesExtension_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -357,7 +409,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -378,7 +430,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -416,12 +468,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -438,15 +490,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, 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 } }); @@ -456,12 +508,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.KubernetesConfiguration.Models.Api20221101.IExtensionsList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,15 +525,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionsList + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzOperation_List.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzOperation_List.cs index 8a2628bea9ff..ed3a724c5fc8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzOperation_List.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/GetAzOperation_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all the available operations the KubernetesConfiguration resource provider supports.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/providers/Microsoft.KubernetesConfiguration/operations", ApiVersion = "2022-11-01")] public partial class GetAzOperation_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class GetAzOperation_List : global::System.Management.Automation. /// 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class GetAzOperation_List : global::System.Management.Automation. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class GetAzOperation_List : global::System.Management.Automation. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +131,24 @@ public partial class GetAzOperation_List : global::System.Management.Automation. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +171,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzOperation_List() { @@ -222,8 +248,33 @@ public GetAzOperation_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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -294,7 +345,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -332,12 +383,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -354,7 +405,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -372,12 +423,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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,15 +440,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperationList + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs index d82d09a6308e..5c9003e02d3b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; - /// Create a new Kubernetes Flux Configuration. + /// create a new Kubernetes Flux Configuration. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfigurationFlux_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("New-AzK8sConfigurationFlux")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration))] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Flux Configuration.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Flux Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// The Flux Configuration object returned in Get & Put response. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration _fluxConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfiguration(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration _fluxConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfiguration(); + + /// + /// 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")] @@ -221,6 +236,9 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S PossibleTypes = new [] { typeof(string) })] public string BucketUrl { get => _fluxConfigurationBody.BucketUrl ?? null; set => _fluxConfigurationBody.BucketUrl = value; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -283,8 +301,8 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S ReadOnly = false, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationBody.ConfigurationProtectedSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -296,6 +314,9 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -410,8 +431,8 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S ReadOnly = false, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations Kustomization { get => _fluxConfigurationBody.Kustomization ?? null /* object */; set => _fluxConfigurationBody.Kustomization = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations Kustomization { get => _fluxConfigurationBody.Kustomization ?? null /* object */; set => _fluxConfigurationBody.Kustomization = value; } /// The client Id for authenticating a Managed Identity. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The client Id for authenticating a Managed Identity.")] @@ -472,7 +493,7 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -560,9 +581,9 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S ReadOnly = false, Description = @"Scope at which the operator will be installed.", SerializedName = @"scope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Scope { get => _fluxConfigurationBody.Scope ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType)""); set => _fluxConfigurationBody.Scope = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + public string Scope { get => _fluxConfigurationBody.Scope ?? null; set => _fluxConfigurationBody.Scope = value; } /// Base64-encoded certificate used to authenticate a Service Principal [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded certificate used to authenticate a Service Principal ")] @@ -641,9 +662,9 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S ReadOnly = false, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationBody.SourceKind = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + public string SourceKind { get => _fluxConfigurationBody.SourceKind ?? null; set => _fluxConfigurationBody.SourceKind = value; } /// Backing field for property. private string _subscriptionId; @@ -659,7 +680,8 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -676,41 +698,29 @@ public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::S PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter Suspend { get => _fluxConfigurationBody.Suspend ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationBody.Suspend = value; } - /// - /// overrideOnBadRequest will be called before the regular onBadRequest has been processed, allowing customization - /// of what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onBadRequest method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnBadRequest(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -760,6 +770,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzK /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -824,11 +839,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -840,10 +880,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -853,7 +909,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzKubernetesConfigurationFlux_CreateExpanded() { @@ -919,7 +975,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -932,12 +988,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FluxConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationBody, onOk, onBadRequest, onDefault, this, Pipeline); + await this.Client.FluxConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_fluxConfigurationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -971,40 +1027,16 @@ protected override void StopProcessing() base.WriteObject(sendToPipeline, enumerateCollection); } - /// a delegate that is called when the remote service returns 400 (BadRequest). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onBadRequest(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnBadRequest(responseMessage, response, ref _returnNow); - // if overrideOnBadRequest has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onBadRequest - response for 400 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - WriteObject((await response)); - } - } - /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -1021,15 +1053,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationBody }) + 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 } }); @@ -1039,12 +1071,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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -1056,8 +1088,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..9f0ba9d2c7ca --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath.cs @@ -0,0 +1,662 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// create a new Kubernetes Flux Configuration. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfigurationFlux_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath Clone() + { + var clone = new NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzKubernetesConfigurationFlux_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateViaJsonString.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateViaJsonString.cs new file mode 100644 index 000000000000..1721b0eb6eb6 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateViaJsonString.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// create a new Kubernetes Flux Configuration. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfigurationFlux_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class NewAzKubernetesConfigurationFlux_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzKubernetesConfigurationFlux_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzKubernetesConfigurationFlux_CreateViaJsonString Clone() + { + var clone = new NewAzKubernetesConfigurationFlux_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzKubernetesConfigurationFlux_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs index d651f36abec6..c0d707289f5f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; - /// Create a new Kubernetes Source Control Configuration. + /// create a new Kubernetes Source Control Configuration. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfiguration_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("New-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration))] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Source Control Configuration.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Source Control Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] public partial class NewAzKubernetesConfiguration_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : 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; + /// The SourceControl Configuration object returned in Get & Put response. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration _sourceControlConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.SourceControlConfiguration(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration _sourceControlConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -106,8 +124,8 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste ReadOnly = false, Description = @"Name-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => _sourceControlConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _sourceControlConfigurationBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => _sourceControlConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _sourceControlConfigurationBody.ConfigurationProtectedSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -130,6 +148,9 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter EnableHelmOperator { get => _sourceControlConfigurationBody.EnableHelmOperator ?? default(global::System.Management.Automation.SwitchParameter); set => _sourceControlConfigurationBody.EnableHelmOperator = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Values override for the operator Helm chart. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Values override for the operator Helm chart.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] @@ -234,9 +255,9 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste ReadOnly = false, Description = @"Scope at which the operator will be installed.", SerializedName = @"operatorScope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType OperatorScope { get => _sourceControlConfigurationBody.OperatorScope ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType)""); set => _sourceControlConfigurationBody.OperatorScope = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + public string OperatorScope { get => _sourceControlConfigurationBody.OperatorScope ?? null; set => _sourceControlConfigurationBody.OperatorScope = value; } /// Type of the operator [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of the operator")] @@ -246,14 +267,14 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste ReadOnly = false, Description = @"Type of the operator", SerializedName = @"operatorType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType OperatorType { get => _sourceControlConfigurationBody.OperatorType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType)""); set => _sourceControlConfigurationBody.OperatorType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + public string OperatorType { get => _sourceControlConfigurationBody.OperatorType ?? null; set => _sourceControlConfigurationBody.OperatorType = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -323,7 +344,8 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -332,36 +354,36 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -384,6 +406,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.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -448,8 +475,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.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -459,7 +511,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzKubernetesConfiguration_CreateExpanded() { @@ -513,7 +565,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -526,12 +578,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SourceControlConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _sourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.SourceControlConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _sourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_sourceControlConfigurationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -567,12 +619,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -584,8 +636,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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; + } + } } } @@ -593,12 +663,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -615,15 +685,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_sourceControlConfigurationBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_sourceControlConfigurationBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -633,12 +703,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.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -650,8 +720,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateViaJsonFilePath.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..9e5de9fb685c --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateViaJsonFilePath.cs @@ -0,0 +1,630 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// create a new Kubernetes Source Control Configuration. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfiguration_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sConfiguration")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Source Control Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class NewAzKubernetesConfiguration_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Source Control Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Source Control Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Source Control Configuration.", + SerializedName = @"sourceControlConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SourceControlConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzKubernetesConfiguration_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SourceControlConfigurationsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SourceControlConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateViaJsonString.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateViaJsonString.cs new file mode 100644 index 000000000000..125fd8fc0d2b --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesConfiguration_CreateViaJsonString.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// create a new Kubernetes Source Control Configuration. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfiguration_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sConfiguration")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Source Control Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class NewAzKubernetesConfiguration_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Source Control Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Source Control Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Source Control Configuration.", + SerializedName = @"sourceControlConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SourceControlConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzKubernetesConfiguration_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SourceControlConfigurationsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SourceControlConfigurationsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs index 9b2e7eea2982..178459aa2535 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; - /// Create a new Kubernetes Cluster Extension. + /// create a new Kubernetes Cluster Extension. /// /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesExtension_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("New-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension))] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Cluster Extension.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class NewAzKubernetesExtension_CreateExpanded : 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(); + /// The Extension object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension _extensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.Extension(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension _extensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Extension(); + + /// 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 identity type. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identity type.")] @@ -47,9 +62,9 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType AkAssignedIdentityType { get => _extensionBody.AkAssignedIdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType)""); set => _extensionBody.AkAssignedIdentityType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + public string AkAssignedIdentityType { get => _extensionBody.AkAssignedIdentityType ?? null; set => _extensionBody.AkAssignedIdentityType = value; } /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -74,6 +89,9 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -138,8 +156,8 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _extensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _extensionBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _extensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _extensionBody.ConfigurationProtectedSetting = value; } /// Configuration settings, as name-value pairs for configuring this extension. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -150,8 +168,8 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _extensionBody.ConfigurationSetting ?? null /* object */; set => _extensionBody.ConfigurationSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _extensionBody.ConfigurationSetting ?? null /* object */; set => _extensionBody.ConfigurationSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -163,6 +181,13 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// 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 => _extensionBody.IdentityType = value.IsPresent ? "SystemAssigned": null ; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with /// Microsoft.KubernetesConfiguration by the Extension publisher. @@ -189,18 +214,6 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// The identity type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identity type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType IdentityType { get => _extensionBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); set => _extensionBody.IdentityType = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -238,7 +251,7 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// A user defined name of the 3rd Party Artifact that is being procured. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A user defined name of the 3rd Party Artifact that is being procured.")] @@ -372,7 +385,8 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -409,24 +423,24 @@ public partial class NewAzKubernetesExtension_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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -476,6 +490,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzK /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -540,11 +559,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -556,10 +600,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -569,7 +629,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzKubernetesExtension_CreateExpanded() { @@ -635,7 +695,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -648,12 +708,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ExtensionsCreate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _extensionBody, onOk, onDefault, this, Pipeline); + await this.Client.ExtensionsCreate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _extensionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_extensionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -691,12 +751,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -713,15 +773,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_extensionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_extensionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -731,12 +791,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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -748,8 +808,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateViaJsonFilePath.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..d75aa557b419 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateViaJsonFilePath.cs @@ -0,0 +1,662 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// create a new Kubernetes Cluster Extension. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesExtension_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sExtension")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Cluster Extension.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class NewAzKubernetesExtension_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Extension. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Extension.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Extension.", + SerializedName = @"extensionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtensionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzKubernetesExtension_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzKubernetesExtension_CreateViaJsonFilePath Clone() + { + var clone = new NewAzKubernetesExtension_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzKubernetesExtension_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtensionsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtensionsCreateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateViaJsonString.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateViaJsonString.cs new file mode 100644 index 000000000000..479e9f1623b1 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/NewAzKubernetesExtension_CreateViaJsonString.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// create a new Kubernetes Cluster Extension. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesExtension_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sExtension")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"create a new Kubernetes Cluster Extension.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class NewAzKubernetesExtension_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Extension. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Extension.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Extension.", + SerializedName = @"extensionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtensionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzKubernetesExtension_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzKubernetesExtension_CreateViaJsonString Clone() + { + var clone = new NewAzKubernetesExtension_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzKubernetesExtension_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtensionsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtensionsCreateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs index 65731d4edf0b..9bc969e43368 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -22,7 +24,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,18 @@ public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -48,6 +63,9 @@ public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -111,6 +129,9 @@ public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. private global::System.Management.Automation.SwitchParameter _forceDelete; @@ -181,7 +202,7 @@ public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -227,7 +248,8 @@ public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -236,12 +258,12 @@ public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 @@ -311,6 +333,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -375,11 +402,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -391,10 +443,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -462,7 +530,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -480,7 +548,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -493,7 +561,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzKubernetesConfigurationFlux_Delete() { @@ -526,12 +594,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -548,15 +616,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs index 6c76870b364c..d370f36dca36 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -22,7 +24,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,18 @@ public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -48,6 +63,9 @@ public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : glo [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : glo [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. private global::System.Management.Automation.SwitchParameter _forceDelete; @@ -124,7 +145,7 @@ public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,12 +168,12 @@ public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : glo /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 @@ -216,6 +237,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -280,11 +306,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -296,10 +347,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -367,7 +434,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -417,7 +484,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -430,7 +497,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity() { @@ -463,12 +530,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -485,15 +552,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs index 461a2f4551c3..499ff85cd297 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -23,7 +25,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,6 +42,18 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -49,6 +64,9 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -112,6 +130,9 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -168,7 +189,7 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -214,7 +235,8 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -223,12 +245,12 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 @@ -297,6 +319,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -361,11 +388,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -377,10 +429,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -448,7 +516,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -466,7 +534,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -479,7 +547,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzKubernetesConfiguration_Delete() { @@ -512,12 +580,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -534,15 +602,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs index fb23b179902d..dbad064daf6e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -23,7 +25,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", ApiVersion = "2022-11-01")] public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,6 +42,18 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -49,6 +64,9 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -111,7 +132,7 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,12 +155,12 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 @@ -202,6 +223,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -266,11 +292,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -282,10 +333,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -353,7 +420,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -403,7 +470,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -416,7 +483,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzKubernetesConfiguration_DeleteViaIdentity() { @@ -449,12 +516,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -471,7 +538,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs index 4726a1a9341a..6551fd4c4a7c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -22,7 +24,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class RemoveAzKubernetesExtension_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,18 @@ public partial class RemoveAzKubernetesExtension_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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -48,6 +63,9 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -111,6 +129,9 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. private global::System.Management.Automation.SwitchParameter _forceDelete; @@ -181,7 +202,7 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -227,7 +248,8 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -236,12 +258,12 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 @@ -311,6 +333,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -375,11 +402,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -391,10 +443,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -462,7 +530,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -480,7 +548,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -493,7 +561,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzKubernetesExtension_Delete() { @@ -526,12 +594,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.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -548,15 +616,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs index 9c739763c003..555ecc6b7b05 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// @@ -22,7 +24,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,18 @@ public partial class RemoveAzKubernetesExtension_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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -48,6 +63,9 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. private global::System.Management.Automation.SwitchParameter _forceDelete; @@ -124,7 +145,7 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,12 +168,12 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 @@ -216,6 +237,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -280,11 +306,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -296,10 +347,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -367,7 +434,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -417,7 +484,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -430,7 +497,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzKubernetesExtension_DeleteViaIdentity() { @@ -463,12 +530,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -485,15 +552,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs index 829952b26ba3..dec8611c369f 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; - /// Update an existing Kubernetes Flux Configuration. + /// update an existing Kubernetes Flux Configuration. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfigurationFlux_UpdateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("Update-AzK8sConfigurationFlux")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration))] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Update an existing Kubernetes Flux Configuration.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"update an existing Kubernetes Flux Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// The Flux Configuration Patch Request object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch _fluxConfigurationPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatch(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch _fluxConfigurationPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatch(); + + /// + /// 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")] @@ -221,6 +236,9 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global PossibleTypes = new [] { typeof(string) })] public string BucketUrl { get => _fluxConfigurationPatchBody.BucketUrl ?? null; set => _fluxConfigurationPatchBody.BucketUrl = value; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -283,8 +301,8 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global ReadOnly = false, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationPatchBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationPatchBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationPatchBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationPatchBody.ConfigurationProtectedSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -296,6 +314,9 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -410,8 +431,8 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global ReadOnly = false, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => _fluxConfigurationPatchBody.Kustomization ?? null /* object */; set => _fluxConfigurationPatchBody.Kustomization = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => _fluxConfigurationPatchBody.Kustomization ?? null /* object */; set => _fluxConfigurationPatchBody.Kustomization = value; } /// The client Id for authenticating a Managed Identity. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The client Id for authenticating a Managed Identity.")] @@ -458,7 +479,7 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -615,9 +636,9 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global ReadOnly = false, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationPatchBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationPatchBody.SourceKind = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + public string SourceKind { get => _fluxConfigurationPatchBody.SourceKind ?? null; set => _fluxConfigurationPatchBody.SourceKind = value; } /// Backing field for property. private string _subscriptionId; @@ -633,7 +654,8 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -655,24 +677,24 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -722,6 +744,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -786,11 +813,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -802,10 +854,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -873,7 +941,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -886,12 +954,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FluxConfigurationsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline); + await this.Client.FluxConfigurationsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_fluxConfigurationPatchBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -911,7 +979,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzKubernetesConfigurationFlux_UpdateExpanded() { @@ -937,12 +1005,12 @@ public UpdateAzKubernetesConfigurationFlux_UpdateExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -959,15 +1027,15 @@ public UpdateAzKubernetesConfigurationFlux_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationPatchBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationPatchBody }) + 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 } }); @@ -977,12 +1045,12 @@ public UpdateAzKubernetesConfigurationFlux_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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -994,8 +1062,26 @@ public UpdateAzKubernetesConfigurationFlux_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs index a0f67e47ef0b..bf6a01275fec 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; - /// Update an existing Kubernetes Flux Configuration. + /// update an existing Kubernetes Flux Configuration. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfigurationFlux_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("Update-AzK8sConfigurationFlux")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration))] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Update an existing Kubernetes Flux Configuration.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"update an existing Kubernetes Flux Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand /// 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; + /// The Flux Configuration Patch Request object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatch _fluxConfigurationPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.FluxConfigurationPatch(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatch _fluxConfigurationPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.FluxConfigurationPatch(); + + /// + /// 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")] @@ -221,6 +236,9 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand PossibleTypes = new [] { typeof(string) })] public string BucketUrl { get => _fluxConfigurationPatchBody.BucketUrl ?? null; set => _fluxConfigurationPatchBody.BucketUrl = value; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -233,8 +251,8 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand ReadOnly = false, Description = @"Key-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationPatchBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationPatchBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationPatchBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationPatchBody.ConfigurationProtectedSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -246,6 +264,9 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS /// @@ -368,8 +389,8 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand ReadOnly = false, Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", SerializedName = @"kustomizations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => _fluxConfigurationPatchBody.Kustomization ?? null /* object */; set => _fluxConfigurationPatchBody.Kustomization = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => _fluxConfigurationPatchBody.Kustomization ?? null /* object */; set => _fluxConfigurationPatchBody.Kustomization = value; } /// The client Id for authenticating a Managed Identity. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The client Id for authenticating a Managed Identity.")] @@ -401,7 +422,7 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -544,9 +565,9 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand ReadOnly = false, Description = @"Source Kind to pull the configuration data from.", SerializedName = @"sourceKind", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationPatchBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationPatchBody.SourceKind = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] + public string SourceKind { get => _fluxConfigurationPatchBody.SourceKind ?? null; set => _fluxConfigurationPatchBody.SourceKind = value; } /// /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. @@ -566,24 +587,24 @@ public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpand /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -629,6 +650,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -693,11 +719,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -709,10 +760,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -780,7 +847,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -795,7 +862,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FluxConfigurationsUpdateViaIdentity(InputObject.Id, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline); + await this.Client.FluxConfigurationsUpdateViaIdentity(InputObject.Id, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); } else { @@ -824,13 +891,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FluxConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FluxConfigurationsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.FluxConfigurationName ?? null, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline); + await this.Client.FluxConfigurationsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.FluxConfigurationName ?? null, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_fluxConfigurationPatchBody}) + 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 } }); @@ -850,7 +917,8 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet + /// class. /// public UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded() { @@ -876,12 +944,12 @@ public UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -898,15 +966,15 @@ public UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_fluxConfigurationPatchBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_fluxConfigurationPatchBody }) + 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 } }); @@ -916,12 +984,12 @@ public UpdateAzKubernetesConfigurationFlux_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.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -933,8 +1001,26 @@ public UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..274a8560967e --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath.cs @@ -0,0 +1,664 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// update an existing Kubernetes Flux Configuration. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfigurationFlux_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Update-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"update an existing Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesConfigurationFlux_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString.cs new file mode 100644 index 000000000000..bf11e6b3e904 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// update an existing Kubernetes Flux Configuration. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfigurationFlux_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Update-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"update an existing Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString Clone() + { + var clone = new UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesConfigurationFlux_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfiguration_UpdateExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfiguration_UpdateExpanded.cs new file mode 100644 index 000000000000..5ee3bef126ea --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfiguration_UpdateExpanded.cs @@ -0,0 +1,795 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// update a new Kubernetes Source Control Configuration. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfiguration_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"update a new Kubernetes Source Control Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class UpdateAzKubernetesConfiguration_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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; + + /// The SourceControl Configuration object returned in Get & Put response. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration _sourceControlConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// Name-value pairs of protected configuration settings for the configuration + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name-value pairs of protected configuration settings for the configuration")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => _sourceControlConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _sourceControlConfigurationBody.ConfigurationProtectedSetting = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Option to enable Helm Operator for this git configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Option to enable Helm Operator for this git configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Option to enable Helm Operator for this git configuration.", + SerializedName = @"enableHelmOperator", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableHelmOperator { get => _sourceControlConfigurationBody.EnableHelmOperator ?? default(global::System.Management.Automation.SwitchParameter); set => _sourceControlConfigurationBody.EnableHelmOperator = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Values override for the operator Helm chart. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Values override for the operator Helm chart.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Values override for the operator Helm chart.", + SerializedName = @"chartValues", + PossibleTypes = new [] { typeof(string) })] + public string HelmOperatorPropertyChartValue { get => _sourceControlConfigurationBody.HelmOperatorPropertyChartValue ?? null; set => _sourceControlConfigurationBody.HelmOperatorPropertyChartValue = value; } + + /// Version of the operator Helm chart. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Version of the operator Helm chart.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version of the operator Helm chart.", + SerializedName = @"chartVersion", + PossibleTypes = new [] { typeof(string) })] + public string HelmOperatorPropertyChartVersion { get => _sourceControlConfigurationBody.HelmOperatorPropertyChartVersion ?? null; set => _sourceControlConfigurationBody.HelmOperatorPropertyChartVersion = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Source Control Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Source Control Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Source Control Configuration.", + SerializedName = @"sourceControlConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SourceControlConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Instance name of the operator - identifying the specific configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Instance name of the operator - identifying the specific configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Instance name of the operator - identifying the specific configuration.", + SerializedName = @"operatorInstanceName", + PossibleTypes = new [] { typeof(string) })] + public string OperatorInstanceName { get => _sourceControlConfigurationBody.OperatorInstanceName ?? null; set => _sourceControlConfigurationBody.OperatorInstanceName = value; } + + /// + /// The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period + /// only. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", + SerializedName = @"operatorNamespace", + PossibleTypes = new [] { typeof(string) })] + public string OperatorNamespace { get => _sourceControlConfigurationBody.OperatorNamespace ?? null; set => _sourceControlConfigurationBody.OperatorNamespace = value; } + + /// Any Parameters for the Operator instance in string format. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Any Parameters for the Operator instance in string format.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Any Parameters for the Operator instance in string format.", + SerializedName = @"operatorParams", + PossibleTypes = new [] { typeof(string) })] + public string OperatorParam { get => _sourceControlConfigurationBody.OperatorParam ?? null; set => _sourceControlConfigurationBody.OperatorParam = value; } + + /// Scope at which the operator will be installed. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Scope at which the operator will be installed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Scope at which the operator will be installed.", + SerializedName = @"operatorScope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + public string OperatorScope { get => _sourceControlConfigurationBody.OperatorScope ?? null; set => _sourceControlConfigurationBody.OperatorScope = value; } + + /// Type of the operator + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of the operator")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the operator", + SerializedName = @"operatorType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + public string OperatorType { get => _sourceControlConfigurationBody.OperatorType ?? null; set => _sourceControlConfigurationBody.OperatorType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Url of the SourceControl Repository. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Url of the SourceControl Repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Url of the SourceControl Repository.", + SerializedName = @"repositoryUrl", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryUrl { get => _sourceControlConfigurationBody.RepositoryUrl ?? null; set => _sourceControlConfigurationBody.RepositoryUrl = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances", + SerializedName = @"sshKnownHostsContents", + PossibleTypes = new [] { typeof(string) })] + public string SshKnownHostsContent { get => _sourceControlConfigurationBody.SshKnownHostsContent ?? null; set => _sourceControlConfigurationBody.SshKnownHostsContent = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SourceControlConfigurationsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + _sourceControlConfigurationBody = await this.Client.SourceControlConfigurationsGetWithResult(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, this, Pipeline); + this.Update_sourceControlConfigurationBody(); + await this.Client.SourceControlConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _sourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesConfiguration_UpdateExpanded() + { + + } + + private void Update_sourceControlConfigurationBody() + { + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorType"))) + { + this.OperatorType = (string)(this.MyInvocation?.BoundParameters["OperatorType"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RepositoryUrl"))) + { + this.RepositoryUrl = (string)(this.MyInvocation?.BoundParameters["RepositoryUrl"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorNamespace"))) + { + this.OperatorNamespace = (string)(this.MyInvocation?.BoundParameters["OperatorNamespace"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorInstanceName"))) + { + this.OperatorInstanceName = (string)(this.MyInvocation?.BoundParameters["OperatorInstanceName"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorParam"))) + { + this.OperatorParam = (string)(this.MyInvocation?.BoundParameters["OperatorParam"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("ConfigurationProtectedSetting"))) + { + this.ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings)(this.MyInvocation?.BoundParameters["ConfigurationProtectedSetting"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorScope"))) + { + this.OperatorScope = (string)(this.MyInvocation?.BoundParameters["OperatorScope"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("SshKnownHostsContent"))) + { + this.SshKnownHostsContent = (string)(this.MyInvocation?.BoundParameters["SshKnownHostsContent"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("EnableHelmOperator"))) + { + this.EnableHelmOperator = (global::System.Management.Automation.SwitchParameter)(this.MyInvocation?.BoundParameters["EnableHelmOperator"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("HelmOperatorPropertyChartVersion"))) + { + this.HelmOperatorPropertyChartVersion = (string)(this.MyInvocation?.BoundParameters["HelmOperatorPropertyChartVersion"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("HelmOperatorPropertyChartValue"))) + { + this.HelmOperatorPropertyChartValue = (string)(this.MyInvocation?.BoundParameters["HelmOperatorPropertyChartValue"]); + } + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfiguration_UpdateViaIdentityExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfiguration_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..5caa1a9670ba --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesConfiguration_UpdateViaIdentityExpanded.cs @@ -0,0 +1,739 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// update a new Kubernetes Source Control Configuration. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfiguration_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"update a new Kubernetes Source Control Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class UpdateAzKubernetesConfiguration_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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; + + /// The SourceControl Configuration object returned in Get & Put response. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration _sourceControlConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.SourceControlConfiguration(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Name-value pairs of protected configuration settings for the configuration + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name-value pairs of protected configuration settings for the configuration")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => _sourceControlConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _sourceControlConfigurationBody.ConfigurationProtectedSetting = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Option to enable Helm Operator for this git configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Option to enable Helm Operator for this git configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Option to enable Helm Operator for this git configuration.", + SerializedName = @"enableHelmOperator", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnableHelmOperator { get => _sourceControlConfigurationBody.EnableHelmOperator ?? default(global::System.Management.Automation.SwitchParameter); set => _sourceControlConfigurationBody.EnableHelmOperator = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Values override for the operator Helm chart. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Values override for the operator Helm chart.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Values override for the operator Helm chart.", + SerializedName = @"chartValues", + PossibleTypes = new [] { typeof(string) })] + public string HelmOperatorPropertyChartValue { get => _sourceControlConfigurationBody.HelmOperatorPropertyChartValue ?? null; set => _sourceControlConfigurationBody.HelmOperatorPropertyChartValue = value; } + + /// Version of the operator Helm chart. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Version of the operator Helm chart.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version of the operator Helm chart.", + SerializedName = @"chartVersion", + PossibleTypes = new [] { typeof(string) })] + public string HelmOperatorPropertyChartVersion { get => _sourceControlConfigurationBody.HelmOperatorPropertyChartVersion ?? null; set => _sourceControlConfigurationBody.HelmOperatorPropertyChartVersion = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Instance name of the operator - identifying the specific configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Instance name of the operator - identifying the specific configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Instance name of the operator - identifying the specific configuration.", + SerializedName = @"operatorInstanceName", + PossibleTypes = new [] { typeof(string) })] + public string OperatorInstanceName { get => _sourceControlConfigurationBody.OperatorInstanceName ?? null; set => _sourceControlConfigurationBody.OperatorInstanceName = value; } + + /// + /// The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period + /// only. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", + SerializedName = @"operatorNamespace", + PossibleTypes = new [] { typeof(string) })] + public string OperatorNamespace { get => _sourceControlConfigurationBody.OperatorNamespace ?? null; set => _sourceControlConfigurationBody.OperatorNamespace = value; } + + /// Any Parameters for the Operator instance in string format. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Any Parameters for the Operator instance in string format.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Any Parameters for the Operator instance in string format.", + SerializedName = @"operatorParams", + PossibleTypes = new [] { typeof(string) })] + public string OperatorParam { get => _sourceControlConfigurationBody.OperatorParam ?? null; set => _sourceControlConfigurationBody.OperatorParam = value; } + + /// Scope at which the operator will be installed. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Scope at which the operator will be installed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Scope at which the operator will be installed.", + SerializedName = @"operatorScope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + public string OperatorScope { get => _sourceControlConfigurationBody.OperatorScope ?? null; set => _sourceControlConfigurationBody.OperatorScope = value; } + + /// Type of the operator + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of the operator")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the operator", + SerializedName = @"operatorType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + public string OperatorType { get => _sourceControlConfigurationBody.OperatorType ?? null; set => _sourceControlConfigurationBody.OperatorType = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Url of the SourceControl Repository. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Url of the SourceControl Repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Url of the SourceControl Repository.", + SerializedName = @"repositoryUrl", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryUrl { get => _sourceControlConfigurationBody.RepositoryUrl ?? null; set => _sourceControlConfigurationBody.RepositoryUrl = value; } + + /// + /// Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances", + SerializedName = @"sshKnownHostsContents", + PossibleTypes = new [] { typeof(string) })] + public string SshKnownHostsContent { get => _sourceControlConfigurationBody.SshKnownHostsContent ?? null; set => _sourceControlConfigurationBody.SshKnownHostsContent = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SourceControlConfigurationsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + _sourceControlConfigurationBody = await this.Client.SourceControlConfigurationsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); + this.Update_sourceControlConfigurationBody(); + await this.Client.SourceControlConfigurationsCreateOrUpdateViaIdentity(InputObject.Id, _sourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterRp) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterRp"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SourceControlConfigurationName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SourceControlConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + _sourceControlConfigurationBody = await this.Client.SourceControlConfigurationsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.SourceControlConfigurationName ?? null, this, Pipeline); + this.Update_sourceControlConfigurationBody(); + await this.Client.SourceControlConfigurationsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.SourceControlConfigurationName ?? null, _sourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesConfiguration_UpdateViaIdentityExpanded() + { + + } + + private void Update_sourceControlConfigurationBody() + { + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorType"))) + { + this.OperatorType = (string)(this.MyInvocation?.BoundParameters["OperatorType"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("RepositoryUrl"))) + { + this.RepositoryUrl = (string)(this.MyInvocation?.BoundParameters["RepositoryUrl"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorNamespace"))) + { + this.OperatorNamespace = (string)(this.MyInvocation?.BoundParameters["OperatorNamespace"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorInstanceName"))) + { + this.OperatorInstanceName = (string)(this.MyInvocation?.BoundParameters["OperatorInstanceName"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorParam"))) + { + this.OperatorParam = (string)(this.MyInvocation?.BoundParameters["OperatorParam"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("ConfigurationProtectedSetting"))) + { + this.ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings)(this.MyInvocation?.BoundParameters["ConfigurationProtectedSetting"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("OperatorScope"))) + { + this.OperatorScope = (string)(this.MyInvocation?.BoundParameters["OperatorScope"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("SshKnownHostsContent"))) + { + this.SshKnownHostsContent = (string)(this.MyInvocation?.BoundParameters["SshKnownHostsContent"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("EnableHelmOperator"))) + { + this.EnableHelmOperator = (global::System.Management.Automation.SwitchParameter)(this.MyInvocation?.BoundParameters["EnableHelmOperator"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("HelmOperatorPropertyChartVersion"))) + { + this.HelmOperatorPropertyChartVersion = (string)(this.MyInvocation?.BoundParameters["HelmOperatorPropertyChartVersion"]); + } + if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("HelmOperatorPropertyChartValue"))) + { + this.HelmOperatorPropertyChartValue = (string)(this.MyInvocation?.BoundParameters["HelmOperatorPropertyChartValue"]); + } + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs index 99c092c19546..4e9b158ee9f9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Patch an existing Kubernetes Cluster Extension. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesExtension_UpdateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("Update-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Patch an existing Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// The Extension Patch Request object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension _patchExtensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtension(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension _patchExtensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtension(); + + /// + /// 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")] @@ -62,6 +77,9 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -126,8 +144,8 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _patchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _patchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationProtectedSetting = value; } /// Configuration settings, as name-value pairs for configuring this extension. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -138,8 +156,8 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _patchExtensionBody.ConfigurationSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _patchExtensionBody.ConfigurationSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -151,6 +169,9 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -200,7 +221,7 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -260,7 +281,8 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -278,41 +300,29 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System PossibleTypes = new [] { typeof(string) })] public string Version { get => _patchExtensionBody.Version ?? null; set => _patchExtensionBody.Version = value; } - /// - /// overrideOnConflict will be called before the regular onConflict has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onConflict method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -362,6 +372,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -426,11 +441,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -442,10 +482,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -513,7 +569,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -526,12 +582,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ExtensionsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _patchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); + await this.Client.ExtensionsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _patchExtensionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_patchExtensionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -551,7 +607,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzKubernetesExtension_UpdateExpanded() { @@ -573,40 +629,16 @@ public UpdateAzKubernetesExtension_UpdateExpanded() base.WriteObject(sendToPipeline, enumerateCollection); } - /// a delegate that is called when the remote service returns 409 (Conflict). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnConflict(responseMessage, response, ref _returnNow); - // if overrideOnConflict has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onConflict - response for 409 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - WriteObject((await response)); - } - } - /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -623,15 +655,15 @@ public UpdateAzKubernetesExtension_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_patchExtensionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_patchExtensionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -641,12 +673,12 @@ public UpdateAzKubernetesExtension_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -658,8 +690,26 @@ public UpdateAzKubernetesExtension_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs index 6daefdc57ac6..dfcf6cb0136b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; using System; /// Patch an existing Kubernetes Cluster Extension. @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesExtension_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("Update-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Patch an existing Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// The Extension Patch Request object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtension _patchExtensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.PatchExtension(); + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtension _patchExtensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.PatchExtension(); + + /// + /// 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")] @@ -62,6 +77,9 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; @@ -76,8 +94,8 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _patchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _patchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationProtectedSetting = value; } /// Configuration settings, as name-value pairs for configuring this extension. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -88,8 +106,8 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _patchExtensionBody.ConfigurationSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _patchExtensionBody.ConfigurationSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationSetting = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -101,6 +119,9 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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] @@ -143,7 +164,7 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -189,41 +210,29 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo PossibleTypes = new [] { typeof(string) })] public string Version { get => _patchExtensionBody.Version ?? null; set => _patchExtensionBody.Version = value; } - /// - /// overrideOnConflict will be called before the regular onConflict has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onConflict method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -267,6 +276,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -331,11 +345,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.KubernetesConfiguration.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.KubernetesConfiguration.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"); @@ -347,10 +386,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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -418,7 +473,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -433,7 +488,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ExtensionsUpdateViaIdentity(InputObject.Id, _patchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); + await this.Client.ExtensionsUpdateViaIdentity(InputObject.Id, _patchExtensionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); } else { @@ -462,13 +517,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExtensionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ExtensionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.ExtensionName ?? null, _patchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); + await this.Client.ExtensionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.ExtensionName ?? null, _patchExtensionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_patchExtensionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -488,7 +543,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() { @@ -510,40 +565,16 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() base.WriteObject(sendToPipeline, enumerateCollection); } - /// a delegate that is called when the remote service returns 409 (Conflict). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnConflict(responseMessage, response, ref _returnNow); - // if overrideOnConflict has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onConflict - response for 409 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse - WriteObject((await response)); - } - } - /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 ) { @@ -560,15 +591,15 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_patchExtensionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_patchExtensionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -578,12 +609,12 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -595,8 +626,26 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaJsonFilePath.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..ec225e99bc1d --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaJsonFilePath.cs @@ -0,0 +1,662 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// Patch an existing Kubernetes Cluster Extension. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesExtension_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Update-AzK8sExtension")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Patch an existing Kubernetes Cluster Extension.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class UpdateAzKubernetesExtension_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Extension. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Extension.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Extension.", + SerializedName = @"extensionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtensionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzKubernetesExtension_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.UpdateAzKubernetesExtension_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzKubernetesExtension_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtensionsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtensionsUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesExtension_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaJsonString.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaJsonString.cs new file mode 100644 index 000000000000..00a1eb2e7446 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaJsonString.cs @@ -0,0 +1,660 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Cmdlets; + using System; + + /// Patch an existing Kubernetes Cluster Extension. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesExtension_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Update-AzK8sExtension")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Patch an existing Kubernetes Cluster Extension.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", ApiVersion = "2022-11-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.NotSuggestDefaultParameterSet] + public partial class UpdateAzKubernetesExtension_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.CompleterInfo( + Name = @"", + Description =@"", + Script = @"'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// + /// The 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Extension. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Extension.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Extension.", + SerializedName = @"extensionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExtensionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzKubernetesExtension_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.UpdateAzKubernetesExtension_UpdateViaJsonString Clone() + { + var clone = new UpdateAzKubernetesExtension_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.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.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExtensionsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExtensionsUpdateViaJsonString(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesExtension_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..c52736c54757 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration +{ + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..7d2eb10ed47b --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration +{ + 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index 7d1e7b2092ae..e3b388afa5c7 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index d6f37324f0a4..9a9185830f62 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index f8bd83daecdb..aef9dd385805 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index c3b509d9becc..cd41f79fe59d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index 003df257d966..4dc1a22dcf29 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index bf3cf075523f..8d61e9ec4159 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 84b9e16f8207..2ce96d2b4645 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 7841a60bbf1f..aab839852a89 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 58ede4025403..d7b184543164 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 4b61e4483f3b..e87b09d57303 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsExtensions.cs index 8a6c4c3a54ea..7fe934d9c82b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Pow { 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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsHelpers.cs index 0f791e329e12..cc51f815c2d4 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Context.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..557dc3adc5e5 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.KubernetesConfiguration Client { get; } + } +} diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Events.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Events.cs index 213dd4887d7e..2ce04cb9922e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Events.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/ISendAsync.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/ISendAsync.cs index f6ea1c5fb353..a91d006df0e8 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/ISendAsync.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/InfoAttribute.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/InfoAttribute.cs index 15424d449f1e..752d414e202b 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/InfoAttribute.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/InputHandler.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..92ccb2415751 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index cc0244909a3b..49b9d05e3738 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/SerializationMode.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/SerializationMode.cs index ddf85161eb18..d65b1fbc32ae 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/SerializationMode.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/TypeConverterExtensions.cs b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/TypeConverterExtensions.cs index 179f7b497c77..a53eda92bf7d 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 index 5035d2126c26..1340be422671 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 @@ -25,12 +25,24 @@ Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -Clu .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +FLUXCONFIGURATIONINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the kubernetes cluster. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. + INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. @@ -47,7 +59,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigFluxOperationStatus { [Alias('Get-AzK8sConfigFluxOperationStatus')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -78,6 +90,7 @@ param( ${FluxConfigurationName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityFluxConfiguration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # operation Id @@ -101,9 +114,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityFluxConfiguration', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + ${FluxConfigurationInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -160,14 +178,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_GetViaIdentity'; + GetViaIdentityFluxConfiguration = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -176,6 +196,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfiguration.ps1 index ca6b9e605ab5..d498da00086c 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfiguration.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfiguration.ps1 @@ -27,7 +27,7 @@ Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName az .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfiguration { [Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -103,7 +103,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -162,15 +161,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_GetViaIdentity'; List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +179,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigurationFlux.ps1 index e63be243e5da..5093eb4acb04 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesConfigurationFlux.ps1 @@ -27,7 +27,7 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigurationFlux { [Alias('Get-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -103,7 +103,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -162,15 +161,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_GetViaIdentity'; List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +179,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesExtension.ps1 index 2cb79c13dbae..da0f8271068e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzKubernetesExtension.ps1 @@ -27,7 +27,7 @@ Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Connect .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -49,7 +49,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -103,7 +103,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -162,15 +161,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_GetViaIdentity'; List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +179,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzOperation.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzOperation.ps1 index fa24c21bbf00..dd4c3021a1a9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzOperation.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Get-AzOperation.ps1 @@ -25,12 +25,12 @@ List all the available operations the KubernetesConfiguration resource provider {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azoperation #> function Get-AzOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.KubernetesConfiguration.private\Get-AzOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfiguration.ps1 index 9334b0bf22fa..2b949ccf312e 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfiguration.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfiguration.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Create a new Kubernetes Source Control Configuration. +create a new Kubernetes Source Control Configuration. .Description -Create a new Kubernetes Source Control Configuration. +create a new Kubernetes Source Control Configuration. .Example New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters @@ -27,13 +27,13 @@ New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName a New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorScope 'cluster' -ClusterType ConnectedClusters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -78,76 +78,88 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Name-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Option to enable Helm Operator for this git configuration. ${EnableHelmOperator}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Values override for the operator Helm chart. ${HelmOperatorChartValue}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Version of the operator Helm chart. ${HelmOperatorChartVersion}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Instance name of the operator - identifying the specific configuration. ${OperatorInstanceName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The namespace to which this operator is installed to. # Maximum of 253 lower case alphanumeric characters, hyphen and period only. ${OperatorNamespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Any Parameters for the Operator instance in string format. ${OperatorParam}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType] + [System.String] # Scope at which the operator will be installed. ${OperatorScope}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType] + [System.String] # Type of the operator ${OperatorType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Url of the SourceControl Repository. ${RepositoryUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances ${SshKnownHost}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -204,13 +216,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateExpanded'; + CreateViaJsonFilePath = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -219,6 +234,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfigurationFlux.ps1 index d998a152a8e4..391274e9f4af 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesConfigurationFlux.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Create a new Kubernetes Flux Configuration. +create a new Kubernetes Flux Configuration. .Description -Create a new Kubernetes Flux Configuration. +create a new Kubernetes Flux Configuration. .Example $kustomizations = @{ infra=@{ @@ -36,13 +36,13 @@ $kustomizations = @{ New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux #> function New-AzKubernetesConfigurationFlux { [Alias('New-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -87,166 +87,166 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The account key (shared key) to access the storage account ${AzureBlobAccountKey}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Azure Blob container name to sync from the url endpoint for the flux configuration. ${AzureBlobContainerName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${AzureBlobLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Shared Access token to access the storage container ${AzureBlobSasToken}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster Azure Blob source with the remote. ${AzureBlobSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. ${AzureBlobTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration Azure Blob storage account. ${AzureBlobUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Security.SecureString] # Plaintext access key used to securely access the S3 bucket ${BucketAccessKey}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specify whether to use insecure communication when puling data from the S3 bucket. ${BucketInsecure}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${BucketLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The bucket name to sync from the url endpoint for the flux configuration. ${BucketName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster bucket source with the remote. ${BucketSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster bucket source with the remote. ${BucketTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration S3 bucket. ${BucketUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS ${GitRepositoryHttpsCaCert}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Plaintext HTTPS username used to access private git repositories over HTTPS ${GitRepositoryHttpsUser}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${GitRepositoryLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH ${GitRepositorySshKnownHost}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster git repository source with the remote. ${GitRepositorySyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster git repository source with the remote. ${GitRepositoryTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration git repository. ${GitRepositoryUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Managed Identity. ${ManagedIdentityClientId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The namespace to which this configuration is installed to. # Maximum of 253 lower case alphanumeric characters, hyphen and period only. ${Namespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository branch name to checkout. ${RepositoryRefBranch}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The commit SHA to checkout. @@ -254,76 +254,88 @@ param( # This takes precedence over semver. ${RepositoryRefCommit}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The semver range used to match against git repository tags. # This takes precedence over tag. ${RepositoryRefSemver}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository tag name to checkout. # This takes precedence over branch. ${RepositoryRefTag}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + [System.String] # Scope at which the operator will be installed. ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificate}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The password for the certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificatePassword}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate ${ServicePrincipalClientCertificateSendChain}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Service Principal. ${ServicePrincipalClientId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client secret for authenticating a Service Principal ${ServicePrincipalClientSecret}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The tenant Id for authenticating a Service Principal ${ServicePrincipalTenantId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether this configuration should suspend its reconciliation of its kustomizations and sources. ${Suspend}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -392,13 +404,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateExpanded'; + CreateViaJsonFilePath = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -407,6 +422,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesExtension.ps1 index 98d3a3737e2b..4fb948ccf3f5 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/New-AzKubernetesExtension.ps1 @@ -16,22 +16,22 @@ <# .Synopsis -Create a new Kubernetes Cluster Extension. +create a new Kubernetes Cluster Extension. .Description -Create a new Kubernetes Cluster Extension. +create a new Kubernetes Cluster Extension. .Example New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azps_test_group -ExtensionType azuremonitor-containers .Example -New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -IdentityType 'SystemAssigned' +New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -EnableSystemAssignedIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -76,54 +76,53 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] + [System.String] # The identity type. ${AkAssignedIdentityType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Flag to note if this extension participates in auto upgrade of minor version, or not. ${AutoUpgradeMinorVersion}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Type of the Extension, of which this resource is an instance of. # It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. ${ExtensionType}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${IdentityType}, - - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # A user defined name of the 3rd Party Artifact that is being procured. ${PlanName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The 3rd Party artifact that is being procured. @@ -132,13 +131,13 @@ param( # Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ${PlanProduct}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # A publisher provided promotion code as provisioned in Data Market for the said product/artifact. ${PlanPromotionCode}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The publisher of the 3rd Party Artifact that is being bought. @@ -146,40 +145,52 @@ param( # NewRelic ${PlanPublisher}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The version of the desired product/artifact. ${PlanVersion}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Namespace where the extension Release must be placed, for a Cluster scoped extension. # If this namespace does not exist, it will be created ${ReleaseNamespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # ReleaseTrain this extension participates in for auto-upgrade (e.g. # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. ${ReleaseTrain}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Namespace where the extension will be created for an Namespace scoped extension. # If this namespace does not exist, it will be created ${TargetNamespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # User-specified version of the extension for this extension to 'pin'. # To use 'version', autoUpgradeMinorVersion must be 'false'. ${Version}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -248,13 +259,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateExpanded'; + CreateViaJsonFilePath = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -263,6 +277,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/ProxyCmdletDefinitions.ps1 index 3b87ad745779..3f3278aa0d67 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -25,12 +25,24 @@ Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -Clu .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +FLUXCONFIGURATIONINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the kubernetes cluster. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. + INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. @@ -47,7 +59,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigFluxOperationStatus { [Alias('Get-AzK8sConfigFluxOperationStatus')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IOperationStatusResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -78,6 +90,7 @@ param( ${FluxConfigurationName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityFluxConfiguration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # operation Id @@ -101,9 +114,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityFluxConfiguration', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + ${FluxConfigurationInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -160,14 +178,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_GetViaIdentity'; + GetViaIdentityFluxConfiguration = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_GetViaIdentityFluxConfiguration'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -176,6 +196,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) @@ -218,7 +241,7 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -240,7 +263,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfigurationFlux { [Alias('Get-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -294,7 +317,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -353,15 +375,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_GetViaIdentity'; List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -370,6 +393,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) @@ -412,7 +438,7 @@ Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName az .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -434,7 +460,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesConfiguration { [Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -488,7 +514,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -547,15 +572,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_GetViaIdentity'; List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -564,6 +590,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) @@ -606,7 +635,7 @@ Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Connect .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -628,7 +657,7 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azk #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -682,7 +711,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -741,15 +769,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_GetViaIdentity'; List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -758,6 +787,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) @@ -798,12 +830,12 @@ List all the available operations the KubernetesConfiguration resource provider {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azoperation #> function Get-AzOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IResourceProviderOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -862,12 +894,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.KubernetesConfiguration.private\Get-AzOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) @@ -899,9 +937,9 @@ end { <# .Synopsis -Create a new Kubernetes Flux Configuration. +create a new Kubernetes Flux Configuration. .Description -Create a new Kubernetes Flux Configuration. +create a new Kubernetes Flux Configuration. .Example $kustomizations = @{ infra=@{ @@ -919,13 +957,13 @@ $kustomizations = @{ New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux #> function New-AzKubernetesConfigurationFlux { [Alias('New-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -970,166 +1008,166 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The account key (shared key) to access the storage account ${AzureBlobAccountKey}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Azure Blob container name to sync from the url endpoint for the flux configuration. ${AzureBlobContainerName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${AzureBlobLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Shared Access token to access the storage container ${AzureBlobSasToken}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster Azure Blob source with the remote. ${AzureBlobSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. ${AzureBlobTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration Azure Blob storage account. ${AzureBlobUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Security.SecureString] # Plaintext access key used to securely access the S3 bucket ${BucketAccessKey}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specify whether to use insecure communication when puling data from the S3 bucket. ${BucketInsecure}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${BucketLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The bucket name to sync from the url endpoint for the flux configuration. ${BucketName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster bucket source with the remote. ${BucketSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster bucket source with the remote. ${BucketTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration S3 bucket. ${BucketUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS ${GitRepositoryHttpsCaCert}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Plaintext HTTPS username used to access private git repositories over HTTPS ${GitRepositoryHttpsUser}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${GitRepositoryLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH ${GitRepositorySshKnownHost}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster git repository source with the remote. ${GitRepositorySyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster git repository source with the remote. ${GitRepositoryTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration git repository. ${GitRepositoryUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Managed Identity. ${ManagedIdentityClientId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The namespace to which this configuration is installed to. # Maximum of 253 lower case alphanumeric characters, hyphen and period only. ${Namespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository branch name to checkout. ${RepositoryRefBranch}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The commit SHA to checkout. @@ -1137,76 +1175,88 @@ param( # This takes precedence over semver. ${RepositoryRefCommit}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The semver range used to match against git repository tags. # This takes precedence over tag. ${RepositoryRefSemver}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository tag name to checkout. # This takes precedence over branch. ${RepositoryRefTag}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + [System.String] # Scope at which the operator will be installed. ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificate}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The password for the certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificatePassword}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate ${ServicePrincipalClientCertificateSendChain}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Service Principal. ${ServicePrincipalClientId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client secret for authenticating a Service Principal ${ServicePrincipalClientSecret}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The tenant Id for authenticating a Service Principal ${ServicePrincipalTenantId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether this configuration should suspend its reconciliation of its kustomizations and sources. ${Suspend}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1275,13 +1325,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateExpanded'; + CreateViaJsonFilePath = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1290,6 +1343,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) @@ -1321,9 +1377,9 @@ end { <# .Synopsis -Create a new Kubernetes Source Control Configuration. +create a new Kubernetes Source Control Configuration. .Description -Create a new Kubernetes Source Control Configuration. +create a new Kubernetes Source Control Configuration. .Example New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azps_test_group -Location eastus -KubeConfig $HOME\.kube\config -KubeContext azps_aks_t01 New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters @@ -1332,13 +1388,13 @@ New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName a New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorScope 'cluster' -ClusterType ConnectedClusters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1383,76 +1439,88 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Name-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Option to enable Helm Operator for this git configuration. ${EnableHelmOperator}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Values override for the operator Helm chart. ${HelmOperatorChartValue}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Version of the operator Helm chart. ${HelmOperatorChartVersion}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Instance name of the operator - identifying the specific configuration. ${OperatorInstanceName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The namespace to which this operator is installed to. # Maximum of 253 lower case alphanumeric characters, hyphen and period only. ${OperatorNamespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Any Parameters for the Operator instance in string format. ${OperatorParam}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType] + [System.String] # Scope at which the operator will be installed. ${OperatorScope}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType] + [System.String] # Type of the operator ${OperatorType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Url of the SourceControl Repository. ${RepositoryUrl}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances ${SshKnownHost}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1509,13 +1577,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateExpanded'; + CreateViaJsonFilePath = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1524,6 +1595,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) @@ -1555,22 +1629,22 @@ end { <# .Synopsis -Create a new Kubernetes Cluster Extension. +create a new Kubernetes Cluster Extension. .Description -Create a new Kubernetes Cluster Extension. +create a new Kubernetes Cluster Extension. .Example New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azps_test_group -ExtensionType azuremonitor-containers .Example -New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -IdentityType 'SystemAssigned' +New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azps_test_group -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ReleaseNamespace flux-system -EnableSystemAssignedIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Link https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1615,54 +1689,53 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] + [System.String] # The identity type. ${AkAssignedIdentityType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Flag to note if this extension participates in auto upgrade of minor version, or not. ${AutoUpgradeMinorVersion}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Type of the Extension, of which this resource is an instance of. # It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. ${ExtensionType}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${IdentityType}, - - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # A user defined name of the 3rd Party Artifact that is being procured. ${PlanName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The 3rd Party artifact that is being procured. @@ -1671,13 +1744,13 @@ param( # Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ${PlanProduct}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # A publisher provided promotion code as provisioned in Data Market for the said product/artifact. ${PlanPromotionCode}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The publisher of the 3rd Party Artifact that is being bought. @@ -1685,40 +1758,52 @@ param( # NewRelic ${PlanPublisher}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The version of the desired product/artifact. ${PlanVersion}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Namespace where the extension Release must be placed, for a Cluster scoped extension. # If this namespace does not exist, it will be created ${ReleaseNamespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # ReleaseTrain this extension participates in for auto-upgrade (e.g. # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. ${ReleaseTrain}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Namespace where the extension will be created for an Namespace scoped extension. # If this namespace does not exist, it will be created ${TargetNamespace}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # User-specified version of the extension for this extension to 'pin'. # To use 'version', autoUpgradeMinorVersion must be 'false'. ${Version}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1787,13 +1872,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateExpanded'; + CreateViaJsonFilePath = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1802,6 +1890,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) @@ -1915,7 +2006,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -1998,14 +2088,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2014,6 +2105,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) @@ -2127,7 +2221,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -2204,14 +2297,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2220,6 +2314,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) @@ -2333,7 +2430,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -2416,14 +2512,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2432,6 +2529,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) @@ -2463,9 +2563,9 @@ end { <# .Synopsis -Update an existing Kubernetes Flux Configuration. +update an existing Kubernetes Flux Configuration. .Description -Update an existing Kubernetes Flux Configuration. +update an existing Kubernetes Flux Configuration. .Example Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azps_test_group -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false .Example @@ -2474,7 +2574,7 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -2496,16 +2596,20 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesConfigurationFlux { [Alias('Update-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The Kubernetes cluster RP - i.e. @@ -2513,6 +2617,8 @@ param( ${ClusterRp}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'})] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -2521,6 +2627,8 @@ param( ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('FluxConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -2528,6 +2636,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. @@ -2535,6 +2645,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2545,162 +2657,187 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The account key (shared key) to access the storage account ${AzureBlobAccountKey}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Azure Blob container name to sync from the url endpoint for the flux configuration. ${AzureBlobContainerName}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${AzureBlobLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Shared Access token to access the storage container ${AzureBlobSasToken}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster Azure Blob source with the remote. ${AzureBlobSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. ${AzureBlobTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration Azure Blob storage account. ${AzureBlobUrl}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Security.SecureString] # Plaintext access key used to securely access the S3 bucket ${BucketAccessKey}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specify whether to use insecure communication when puling data from the S3 bucket. ${BucketInsecure}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${BucketLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The bucket name to sync from the url endpoint for the flux configuration. ${BucketName}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster bucket source with the remote. ${BucketSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster bucket source with the remote. ${BucketTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration S3 bucket. ${BucketUrl}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS ${GitRepositoryHttpsCaCert}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Plaintext HTTPS username used to access private git repositories over HTTPS ${GitRepositoryHttpsUser}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${GitRepositoryLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH ${GitRepositorySshKnownHost}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster git repository source with the remote. ${GitRepositorySyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster git repository source with the remote. ${GitRepositoryTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration git repository. ${GitRepositoryUrl}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Managed Identity. ${ManagedIdentityClientId}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository branch name to checkout. ${RepositoryRefBranch}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The commit SHA to checkout. @@ -2708,69 +2845,91 @@ param( # This takes precedence over semver. ${RepositoryRefCommit}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The semver range used to match against git repository tags. # This takes precedence over tag. ${RepositoryRefSemver}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository tag name to checkout. # This takes precedence over branch. ${RepositoryRefTag}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificate}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The password for the certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificatePassword}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate ${ServicePrincipalClientCertificateSendChain}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Service Principal. ${ServicePrincipalClientId}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client secret for authenticating a Service Principal ${ServicePrincipalClientSecret}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The tenant Id for authenticating a Service Principal ${ServicePrincipalTenantId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether this configuration should suspend its reconciliation of its kustomizations and sources. ${Suspend}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2839,14 +2998,277 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $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) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +update a new Kubernetes Source Control Configuration. +.Description +update a new Kubernetes Source Control Configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the kubernetes cluster. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfiguration +#> +function Update-AzKubernetesConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [ArgumentCompleter({'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'})] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Name-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Option to enable Helm Operator for this git configuration. + ${EnableHelmOperator}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Values override for the operator Helm chart. + ${HelmOperatorPropertyChartValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Version of the operator Helm chart. + ${HelmOperatorPropertyChartVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Instance name of the operator - identifying the specific configuration. + ${OperatorInstanceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this operator is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${OperatorNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Any Parameters for the Operator instance in string format. + ${OperatorParam}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Scope at which the operator will be installed. + ${OperatorScope}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Type of the operator + ${OperatorType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Url of the SourceControl Repository. + ${RepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + ${SshKnownHostsContent}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfiguration_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfiguration_UpdateViaIdentityExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -2855,6 +3277,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) @@ -2895,7 +3320,7 @@ Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Conn .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -2917,16 +3342,20 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The Kubernetes cluster RP - i.e. @@ -2934,6 +3363,8 @@ param( ${ClusterRp}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'})] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -2942,6 +3373,8 @@ param( ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('ExtensionName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -2949,6 +3382,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. @@ -2956,6 +3391,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2966,43 +3403,59 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Flag to note if this extension participates in auto upgrade of minor version, or not. ${AutoUpgradeMinorVersion}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # ReleaseTrain this extension participates in for auto-upgrade (e.g. # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. ${ReleaseTrain}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Version of the extension for this extension, if it is 'pinned' to a specific version. # autoUpgradeMinorVersion must be 'false'. ${Version}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3071,14 +3524,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3087,6 +3543,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfiguration.ps1 index c0d467dd0226..bbcf1c3e43ed 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfiguration.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfiguration.ps1 @@ -98,7 +98,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -175,14 +174,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -191,6 +191,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfigurationFlux.ps1 index 6d57c9291928..00e28e3290cc 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesConfigurationFlux.ps1 @@ -98,7 +98,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -181,14 +180,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -197,6 +197,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesExtension.ps1 index 8bcf1a2a945f..1a750245891a 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Remove-AzKubernetesExtension.ps1 @@ -98,7 +98,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -181,14 +180,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 { @@ -197,6 +197,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfiguration.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfiguration.ps1 new file mode 100644 index 000000000000..3a851ae97d23 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfiguration.ps1 @@ -0,0 +1,275 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +update a new Kubernetes Source Control Configuration. +.Description +update a new Kubernetes Source Control Configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the kubernetes cluster. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfiguration +#> +function Update-AzKubernetesConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.ISourceControlConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [ArgumentCompleter({'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'})] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Name-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Option to enable Helm Operator for this git configuration. + ${EnableHelmOperator}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Values override for the operator Helm chart. + ${HelmOperatorPropertyChartValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Version of the operator Helm chart. + ${HelmOperatorPropertyChartVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Instance name of the operator - identifying the specific configuration. + ${OperatorInstanceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this operator is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${OperatorNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Any Parameters for the Operator instance in string format. + ${OperatorParam}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("cluster", "namespace")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Scope at which the operator will be installed. + ${OperatorScope}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("Flux")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Type of the operator + ${OperatorType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Url of the SourceControl Repository. + ${RepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + ${SshKnownHostsContent}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfiguration_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfiguration_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $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) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfigurationFlux.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfigurationFlux.ps1 index 43662744cf62..db39de0128f9 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfigurationFlux.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesConfigurationFlux.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Update an existing Kubernetes Flux Configuration. +update an existing Kubernetes Flux Configuration. .Description -Update an existing Kubernetes Flux Configuration. +update an existing Kubernetes Flux Configuration. .Example Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azps_test_group -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false .Example @@ -27,7 +27,7 @@ Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -49,16 +49,20 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesConfigurationFlux { [Alias('Update-AzK8sConfigurationFlux')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The Kubernetes cluster RP - i.e. @@ -66,6 +70,8 @@ param( ${ClusterRp}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'})] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -74,6 +80,8 @@ param( ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('FluxConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -81,6 +89,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. @@ -88,6 +98,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -98,162 +110,187 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The account key (shared key) to access the storage account ${AzureBlobAccountKey}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Azure Blob container name to sync from the url endpoint for the flux configuration. ${AzureBlobContainerName}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${AzureBlobLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The Shared Access token to access the storage container ${AzureBlobSasToken}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster Azure Blob source with the remote. ${AzureBlobSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. ${AzureBlobTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration Azure Blob storage account. ${AzureBlobUrl}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Security.SecureString] # Plaintext access key used to securely access the S3 bucket ${BucketAccessKey}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specify whether to use insecure communication when puling data from the S3 bucket. ${BucketInsecure}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${BucketLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The bucket name to sync from the url endpoint for the flux configuration. ${BucketName}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster bucket source with the remote. ${BucketSyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster bucket source with the remote. ${BucketTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration S3 bucket. ${BucketUrl}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS ${GitRepositoryHttpsCaCert}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Plaintext HTTPS username used to access private git repositories over HTTPS ${GitRepositoryHttpsUser}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. ${GitRepositoryLocalAuthRef}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH ${GitRepositorySshKnownHost}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The interval at which to re-reconcile the cluster git repository source with the remote. ${GitRepositorySyncIntervalInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Int64] # The maximum time to attempt to reconcile the cluster git repository source with the remote. ${GitRepositoryTimeoutInSecond}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The URL to sync for the flux configuration git repository. ${GitRepositoryUrl}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IFluxConfigurationPatchPropertiesKustomizations]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IFluxConfigurationPatchPropertiesKustomizations]))] [System.Collections.Hashtable] # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. ${Kustomization}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Managed Identity. ${ManagedIdentityClientId}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository branch name to checkout. ${RepositoryRefBranch}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The commit SHA to checkout. @@ -261,69 +298,91 @@ param( # This takes precedence over semver. ${RepositoryRefCommit}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The semver range used to match against git repository tags. # This takes precedence over tag. ${RepositoryRefSemver}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The git repository tag name to checkout. # This takes precedence over branch. ${RepositoryRefTag}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Base64-encoded certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificate}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The password for the certificate used to authenticate a Service Principal ${ServicePrincipalClientCertificatePassword}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate ${ServicePrincipalClientCertificateSendChain}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client Id for authenticating a Service Principal. ${ServicePrincipalClientId}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The client secret for authenticating a Service Principal ${ServicePrincipalClientSecret}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The tenant Id for authenticating a Service Principal ${ServicePrincipalTenantId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PSArgumentCompleterAttribute("GitRepository", "Bucket", "AzureBlob")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + [System.String] # Source Kind to pull the configuration data from. ${SourceKind}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether this configuration should suspend its reconciliation of its kustomizations and sources. ${Suspend}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -392,14 +451,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -408,6 +470,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesExtension.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesExtension.ps1 index bd3622aeeedd..73bbf2373d77 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesExtension.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/internal/Update-AzKubernetesExtension.ps1 @@ -25,7 +25,7 @@ Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType Conn .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -47,16 +47,20 @@ https://learn.microsoft.com/powershell/module/az.kubernetesconfiguration/update- #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The Kubernetes cluster RP - i.e. @@ -64,6 +68,8 @@ param( ${ClusterRp}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ArgumentCompleter({'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'})] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -72,6 +78,8 @@ param( ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('ExtensionName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] @@ -79,6 +87,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. @@ -86,6 +96,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -96,43 +108,59 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] # Flag to note if this extension participates in auto upgrade of minor version, or not. ${AutoUpgradeMinorVersion}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20221101.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # ReleaseTrain this extension participates in for auto-upgrade (e.g. # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. ${ReleaseTrain}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Version of the extension for this extension, if it is 'pinned' to a specific version. # autoUpgradeMinorVersion must be 'false'. ${Version}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -201,14 +229,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -217,6 +248,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/KubernetesConfiguration/KubernetesConfiguration.Autorest/resources/README.md b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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/KubernetesConfiguration/KubernetesConfiguration.Autorest/test-module.ps1 b/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/test-module.ps1 index 3c7f0cae3977..f82a86156cdb 100644 --- a/generated/KubernetesConfiguration/KubernetesConfiguration.Autorest/test-module.ps1 +++ b/generated/KubernetesConfiguration/KubernetesConfiguration.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-------------'