// <auto-generated/>

#nullable disable

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

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

            string kind = "cat";
            string name = default;
            bool meows = default;

            foreach (var child in element.Elements())
            {
                string localName = child.Name.LocalName;
                if ((localName == "kind"))
                {
                    kind = ((string)child);
                    continue;
                }
                if ((localName == "name"))
                {
                    name = ((string)child);
                    continue;
                }
                if ((localName == "meows"))
                {
                    meows = ((bool)child);
                    continue;
                }
            }
            return new global::Sample.Models.Cat(kind, name, meows);
        }
    }
}
