internal static PrivateDnsZoneConfig DeserializePrivateDnsZoneConfig(JsonElement element)
        {
            Optional <string> name             = default;
            Optional <string> privateDnsZoneId = default;
            Optional <IReadOnlyList <RecordSet> > recordSets = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("privateDnsZoneId"))
                        {
                            privateDnsZoneId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("recordSets"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <RecordSet> array = new List <RecordSet>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(RecordSet.DeserializeRecordSet(item));
                            }
                            recordSets = array;
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new PrivateDnsZoneConfig(name.Value, privateDnsZoneId.Value, Optional.ToList(recordSets)));
        }