internal static HubIPAddresses DeserializeHubIPAddresses(JsonElement element)
        {
            Optional <IReadOnlyList <AzureFirewallPublicIPAddress> > publicIPAddresses = default;
            Optional <string> privateIPAddress = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("publicIPAddresses"))
                {
                    List <AzureFirewallPublicIPAddress> array = new List <AzureFirewallPublicIPAddress>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(AzureFirewallPublicIPAddress.DeserializeAzureFirewallPublicIPAddress(item));
                    }
                    publicIPAddresses = array;
                    continue;
                }
                if (property.NameEquals("privateIPAddress"))
                {
                    privateIPAddress = property.Value.GetString();
                    continue;
                }
            }
            return(new HubIPAddresses(Optional.ToList(publicIPAddresses), privateIPAddress.Value));
        }
        internal static HubIPAddresses DeserializeHubIPAddresses(JsonElement element)
        {
            IList <AzureFirewallPublicIPAddress> publicIPAddresses = default;
            string privateIPAddress = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("publicIPAddresses"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <AzureFirewallPublicIPAddress> array = new List <AzureFirewallPublicIPAddress>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(AzureFirewallPublicIPAddress.DeserializeAzureFirewallPublicIPAddress(item));
                        }
                    }
                    publicIPAddresses = array;
                    continue;
                }
                if (property.NameEquals("privateIPAddress"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    privateIPAddress = property.Value.GetString();
                    continue;
                }
            }
            return(new HubIPAddresses(publicIPAddresses, privateIPAddress));
        }