// <auto-generated/>

#nullable disable

using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.Xml.Linq;
using Sample.Models;

namespace Sample
{
    public partial class TestXmlModel
    {
        internal static global::Sample.Models.TestXmlModel DeserializeTestXmlModel(global::System.Xml.Linq.XElement element, global::System.ClientModel.Primitives.ModelReaderWriterOptions options)
        {
            if ((element == null))
            {
                return null;
            }

            global::System.Collections.Generic.IList<string> colors = default;

            foreach (var child in element.Elements())
            {
                string localName = child.Name.LocalName;
                if ((localName == "colors"))
                {
                    if ((colors == null))
                    {
                        colors = new global::System.Collections.Generic.List<string>();
                    }
                    colors.Add(((string)child));
                    continue;
                }
            }
            return new global::Sample.Models.TestXmlModel((colors ?? new global::Sample.ChangeTrackingList<string>()));
        }
    }
}
