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

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("privateDnsZoneId"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            privateDnsZoneId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("recordSets"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <RecordSet> array = new List <RecordSet>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(RecordSet.DeserializeRecordSet(item));
                                }
                            }
                            recordSets = array;
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new PrivateDnsZoneConfig(name, privateDnsZoneId, recordSets));
        }
        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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("privateDnsZoneId"))
                        {
                            privateDnsZoneId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("recordSets"))
                        {
                            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)));
        }