internal AKSProperties(string clusterFqdn, IReadOnlyList <SystemService> systemServices, int?agentCount, string agentVMSize, SslConfiguration sslConfiguration, AksNetworkingConfiguration aksNetworkingConfiguration)
 {
     ClusterFqdn                = clusterFqdn;
     SystemServices             = systemServices;
     AgentCount                 = agentCount;
     AgentVMSize                = agentVMSize;
     SslConfiguration           = sslConfiguration;
     AksNetworkingConfiguration = aksNetworkingConfiguration;
 }
        internal static AKSProperties DeserializeAKSProperties(JsonElement element)
        {
            Optional <string> clusterFqdn = default;
            Optional <IReadOnlyList <SystemService> > systemServices         = default;
            Optional <int>                        agentCount                 = default;
            Optional <string>                     agentVMSize                = default;
            Optional <SslConfiguration>           sslConfiguration           = default;
            Optional <AksNetworkingConfiguration> aksNetworkingConfiguration = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("clusterFqdn"))
                {
                    clusterFqdn = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemServices"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <SystemService> array = new List <SystemService>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(SystemService.DeserializeSystemService(item));
                    }
                    systemServices = array;
                    continue;
                }
                if (property.NameEquals("agentCount"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    agentCount = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("agentVMSize"))
                {
                    agentVMSize = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("sslConfiguration"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    sslConfiguration = SslConfiguration.DeserializeSslConfiguration(property.Value);
                    continue;
                }
                if (property.NameEquals("aksNetworkingConfiguration"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    aksNetworkingConfiguration = AksNetworkingConfiguration.DeserializeAksNetworkingConfiguration(property.Value);
                    continue;
                }
            }
            return(new AKSProperties(clusterFqdn.Value, Optional.ToList(systemServices), Optional.ToNullable(agentCount), agentVMSize.Value, sslConfiguration.Value, aksNetworkingConfiguration.Value));
        }