/// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of <see cref="ManagedClusterPropertiesAutoScalerProfile" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ManagedClusterPropertiesAutoScalerProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _balanceSimilarNodeGroup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("balance-similar-node-groups"), out var __jsonBalanceSimilarNodeGroups) ? (string)__jsonBalanceSimilarNodeGroups : (string)BalanceSimilarNodeGroup; }
            { _expander = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("expander"), out var __jsonExpander) ? (string)__jsonExpander : (string)Expander; }
            { _maxEmptyBulkDelete = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("max-empty-bulk-delete"), out var __jsonMaxEmptyBulkDelete) ? (string)__jsonMaxEmptyBulkDelete : (string)MaxEmptyBulkDelete; }
            { _maxGracefulTerminationSec = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("max-graceful-termination-sec"), out var __jsonMaxGracefulTerminationSec) ? (string)__jsonMaxGracefulTerminationSec : (string)MaxGracefulTerminationSec; }
            { _maxTotalUnreadyPercentage = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("max-total-unready-percentage"), out var __jsonMaxTotalUnreadyPercentage) ? (string)__jsonMaxTotalUnreadyPercentage : (string)MaxTotalUnreadyPercentage; }
            { _newPodScaleUpDelay = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("new-pod-scale-up-delay"), out var __jsonNewPodScaleUpDelay) ? (string)__jsonNewPodScaleUpDelay : (string)NewPodScaleUpDelay; }
            { _okTotalUnreadyCount = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("ok-total-unready-count"), out var __jsonOkTotalUnreadyCount) ? (string)__jsonOkTotalUnreadyCount : (string)OkTotalUnreadyCount; }
            { _scanInterval = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scan-interval"), out var __jsonScanInterval) ? (string)__jsonScanInterval : (string)ScanInterval; }
            { _scaleDownDelayAfterAdd = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scale-down-delay-after-add"), out var __jsonScaleDownDelayAfterAdd) ? (string)__jsonScaleDownDelayAfterAdd : (string)ScaleDownDelayAfterAdd; }
            { _scaleDownDelayAfterDelete = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scale-down-delay-after-delete"), out var __jsonScaleDownDelayAfterDelete) ? (string)__jsonScaleDownDelayAfterDelete : (string)ScaleDownDelayAfterDelete; }
            { _scaleDownDelayAfterFailure = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scale-down-delay-after-failure"), out var __jsonScaleDownDelayAfterFailure) ? (string)__jsonScaleDownDelayAfterFailure : (string)ScaleDownDelayAfterFailure; }
            { _scaleDownUnneededTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scale-down-unneeded-time"), out var __jsonScaleDownUnneededTime) ? (string)__jsonScaleDownUnneededTime : (string)ScaleDownUnneededTime; }
            { _scaleDownUnreadyTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scale-down-unready-time"), out var __jsonScaleDownUnreadyTime) ? (string)__jsonScaleDownUnreadyTime : (string)ScaleDownUnreadyTime; }
            { _scaleDownUtilizationThreshold = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scale-down-utilization-threshold"), out var __jsonScaleDownUtilizationThreshold) ? (string)__jsonScaleDownUtilizationThreshold : (string)ScaleDownUtilizationThreshold; }
            { _skipNodesWithLocalStorage = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("skip-nodes-with-local-storage"), out var __jsonSkipNodesWithLocalStorage) ? (string)__jsonSkipNodesWithLocalStorage : (string)SkipNodesWithLocalStorage; }
            { _skipNodesWithSystemPod = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("skip-nodes-with-system-pods"), out var __jsonSkipNodesWithSystemPods) ? (string)__jsonSkipNodesWithSystemPods : (string)SkipNodesWithSystemPod; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of <see cref="ManagedClusterAgentPoolProfileProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ManagedClusterAgentPoolProfileProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _upgradeSetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("upgradeSettings"), out var __jsonUpgradeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettings.FromJson(__jsonUpgradeSettings) : UpgradeSetting; }
            { _powerState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("powerState"), out var __jsonPowerState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState.FromJson(__jsonPowerState) : PowerState; }
            { _count = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("count"), out var __jsonCount) ? (int?)__jsonCount : Count; }
            { _vMSize = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("vmSize"), out var __jsonVMSize) ? (string)__jsonVMSize : (string)VMSize; }
            { _oSDiskSizeGb = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("osDiskSizeGB"), out var __jsonOSDiskSizeGb) ? (int?)__jsonOSDiskSizeGb : OSDiskSizeGb; }
            { _oSDiskType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("osDiskType"), out var __jsonOSDiskType) ? (string)__jsonOSDiskType : (string)OSDiskType; }
            { _vnetSubnetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("vnetSubnetID"), out var __jsonVnetSubnetId) ? (string)__jsonVnetSubnetId : (string)VnetSubnetId; }
            { _maxPod = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("maxPods"), out var __jsonMaxPods) ? (int?)__jsonMaxPods : MaxPod; }
            { _oSType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType; }
            { _maxCount = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("maxCount"), out var __jsonMaxCount) ? (int?)__jsonMaxCount : MaxCount; }
            { _minCount = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("minCount"), out var __jsonMinCount) ? (int?)__jsonMinCount : MinCount; }
            { _enableAutoScaling = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean>("enableAutoScaling"), out var __jsonEnableAutoScaling) ? (bool?)__jsonEnableAutoScaling : EnableAutoScaling; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _mode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("mode"), out var __jsonMode) ? (string)__jsonMode : (string)Mode; }
            { _orchestratorVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("orchestratorVersion"), out var __jsonOrchestratorVersion) ? (string)__jsonOrchestratorVersion : (string)OrchestratorVersion; }
            { _nodeImageVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("nodeImageVersion"), out var __jsonNodeImageVersion) ? (string)__jsonNodeImageVersion : (string)NodeImageVersion; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _availabilityZone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray>("availabilityZones"), out var __jsonAvailabilityZones) ? If(__jsonAvailabilityZones as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : AvailabilityZone; }
            { _enableNodePublicIP = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean>("enableNodePublicIP"), out var __jsonEnableNodePublicIP) ? (bool?)__jsonEnableNodePublicIP : EnableNodePublicIP; }
            { _scaleSetPriority = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scaleSetPriority"), out var __jsonScaleSetPriority) ? (string)__jsonScaleSetPriority : (string)ScaleSetPriority; }
            { _scaleSetEvictionPolicy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("scaleSetEvictionPolicy"), out var __jsonScaleSetEvictionPolicy) ? (string)__jsonScaleSetEvictionPolicy : (string)ScaleSetEvictionPolicy; }
            { _spotMaxPrice = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("spotMaxPrice"), out var __jsonSpotMaxPrice) ? (float?)__jsonSpotMaxPrice : SpotMaxPrice; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTags.FromJson(__jsonTags) : Tag; }
            { _nodeLabel = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("nodeLabels"), out var __jsonNodeLabels) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabels.FromJson(__jsonNodeLabels) : NodeLabel; }
            { _nodeTaint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray>("nodeTaints"), out var __jsonNodeTaints) ? If(__jsonNodeTaints as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (string)(__p is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null))))() : null : NodeTaint; }
            { _proximityPlacementGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("proximityPlacementGroupID"), out var __jsonProximityPlacementGroupId) ? (string)__jsonProximityPlacementGroupId : (string)ProximityPlacementGroupId; }
            AfterFromJson(json);
        }
Exemple #3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject into a new instance of <see cref="ManagedClusterProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ManagedClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _powerState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("powerState"), out var __jsonPowerState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState.FromJson(__jsonPowerState) : PowerState; }
            { _linuxProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("linuxProfile"), out var __jsonLinuxProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfile.FromJson(__jsonLinuxProfile) : LinuxProfile; }
            { _windowsProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("windowsProfile"), out var __jsonWindowsProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfile.FromJson(__jsonWindowsProfile) : WindowsProfile; }
            { _servicePrincipalProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("servicePrincipalProfile"), out var __jsonServicePrincipalProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfile.FromJson(__jsonServicePrincipalProfile) : ServicePrincipalProfile; }
            { _networkProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("networkProfile"), out var __jsonNetworkProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfile.FromJson(__jsonNetworkProfile) : NetworkProfile; }
            { _aadProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfile.FromJson(__jsonAadProfile) : AadProfile; }
            { _autoScalerProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("autoScalerProfile"), out var __jsonAutoScalerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfile.FromJson(__jsonAutoScalerProfile) : AutoScalerProfile; }
            { _apiServerAccessProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("apiServerAccessProfile"), out var __jsonApiServerAccessProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfile.FromJson(__jsonApiServerAccessProfile) : ApiServerAccessProfile; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _maxAgentPool = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber>("maxAgentPools"), out var __jsonMaxAgentPools) ? (int?)__jsonMaxAgentPools : MaxAgentPool; }
            { _kubernetesVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)KubernetesVersion; }
            { _dnsPrefix = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("dnsPrefix"), out var __jsonDnsPrefix) ? (string)__jsonDnsPrefix : (string)DnsPrefix; }
            { _fqdn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("fqdn"), out var __jsonFqdn) ? (string)__jsonFqdn : (string)Fqdn; }
            { _privateFqdn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("privateFQDN"), out var __jsonPrivateFqdn) ? (string)__jsonPrivateFqdn : (string)PrivateFqdn; }
            { _agentPoolProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray>("agentPoolProfiles"), out var __jsonAgentPoolProfiles) ? If(__jsonAgentPoolProfiles as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile)(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfile.FromJson(__u)))))() : null : AgentPoolProfile; }
            { _addonProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("addonProfiles"), out var __jsonAddonProfiles) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfiles.FromJson(__jsonAddonProfiles) : AddonProfile; }
            { _nodeResourceGroup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("nodeResourceGroup"), out var __jsonNodeResourceGroup) ? (string)__jsonNodeResourceGroup : (string)NodeResourceGroup; }
            { _enableRbac = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean>("enableRBAC"), out var __jsonEnableRbac) ? (bool?)__jsonEnableRbac : EnableRbac; }
            { _enablePodSecurityPolicy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean>("enablePodSecurityPolicy"), out var __jsonEnablePodSecurityPolicy) ? (bool?)__jsonEnablePodSecurityPolicy : EnablePodSecurityPolicy; }
            { _diskEncryptionSetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString>("diskEncryptionSetID"), out var __jsonDiskEncryptionSetId) ? (string)__jsonDiskEncryptionSetId : (string)DiskEncryptionSetId; }
            { _identityProfile = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject>("identityProfile"), out var __jsonIdentityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfile.FromJson(__jsonIdentityProfile) : IdentityProfile; }
            AfterFromJson(json);
        }