// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;

namespace SampleTypeSpec
{
    /// <summary> An advanced XML model for testing various property types and XML features. </summary>
    public partial class XmlAdvancedModel
    {
        /// <summary> Keeps track of any properties unknown to the library. </summary>
        private protected readonly IDictionary<string, BinaryData> _additionalBinaryDataProperties;

        /// <summary> Initializes a new instance of <see cref="XmlAdvancedModel"/>. </summary>
        /// <param name="name"> A simple string property. </param>
        /// <param name="age"> An integer property. </param>
        /// <param name="enabled"> A boolean property. </param>
        /// <param name="score"> A float property. </param>
        /// <param name="nullableString"> A nullable string. </param>
        /// <param name="id"> A string as XML attribute. </param>
        /// <param name="version"> An integer as XML attribute. </param>
        /// <param name="isActive"> A boolean as XML attribute. </param>
        /// <param name="originalName"> A property with a custom XML element name. </param>
        /// <param name="xmlIdentifier"> An attribute with a custom XML name. </param>
        /// <param name="content"> Text content in the element (unwrapped string). </param>
        /// <param name="unwrappedStrings"> An unwrapped array of strings - items appear directly without wrapper. </param>
        /// <param name="unwrappedCounts"> An unwrapped array of integers. </param>
        /// <param name="unwrappedItems"> An unwrapped array of models. </param>
        /// <param name="wrappedColors"> A wrapped array of strings (default). </param>
        /// <param name="items"> A wrapped array with custom wrapper name. </param>
        /// <param name="nestedModel"> A nested model property. </param>
        /// <param name="metadata"> A dictionary property. </param>
        /// <param name="createdAt"> A date-time property. </param>
        /// <param name="duration"> A duration property. </param>
        /// <param name="data"> A bytes property. </param>
        /// <param name="fixedEnum"> A fixed enum property. </param>
        /// <param name="extensibleEnum"> An extensible enum property. </param>
        /// <param name="label"></param>
        /// <param name="daysUsed"></param>
        /// <param name="fooItems"></param>
        /// <param name="anotherModel"></param>
        /// <param name="modelsWithNamespaces"></param>
        /// <param name="unwrappedModelsWithNamespaces"></param>
        /// <param name="listOfListFoo"></param>
        /// <param name="dictionaryFoo"></param>
        /// <param name="dictionaryOfDictionaryFoo"></param>
        /// <param name="dictionaryListFoo"></param>
        /// <param name="listOfDictionaryFoo"></param>
        /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="id"/>, <paramref name="originalName"/>, <paramref name="xmlIdentifier"/>, <paramref name="content"/>, <paramref name="unwrappedStrings"/>, <paramref name="unwrappedCounts"/>, <paramref name="unwrappedItems"/>, <paramref name="wrappedColors"/>, <paramref name="items"/>, <paramref name="nestedModel"/>, <paramref name="metadata"/>, <paramref name="data"/>, <paramref name="label"/>, <paramref name="fooItems"/>, <paramref name="anotherModel"/>, <paramref name="modelsWithNamespaces"/>, <paramref name="unwrappedModelsWithNamespaces"/>, <paramref name="listOfListFoo"/>, <paramref name="dictionaryFoo"/>, <paramref name="dictionaryOfDictionaryFoo"/>, <paramref name="dictionaryListFoo"/> or <paramref name="listOfDictionaryFoo"/> is null. </exception>
        public XmlAdvancedModel(string name, int age, bool enabled, float score, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IEnumerable<string> unwrappedStrings, IEnumerable<int> unwrappedCounts, IEnumerable<XmlItem> unwrappedItems, IEnumerable<string> wrappedColors, IEnumerable<XmlItem> items, XmlNestedModel nestedModel, IDictionary<string, string> metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, string label, int daysUsed, IEnumerable<string> fooItems, XmlNestedModel anotherModel, IEnumerable<XmlModelWithNamespace> modelsWithNamespaces, IEnumerable<XmlModelWithNamespace> unwrappedModelsWithNamespaces, IEnumerable<IList<XmlItem>> listOfListFoo, IDictionary<string, XmlItem> dictionaryFoo, IDictionary<string, IDictionary<string, XmlItem>> dictionaryOfDictionaryFoo, IDictionary<string, IList<XmlItem>> dictionaryListFoo, IEnumerable<IDictionary<string, XmlItem>> listOfDictionaryFoo)
        {
            Argument.AssertNotNull(name, nameof(name));
            Argument.AssertNotNull(id, nameof(id));
            Argument.AssertNotNull(originalName, nameof(originalName));
            Argument.AssertNotNull(xmlIdentifier, nameof(xmlIdentifier));
            Argument.AssertNotNull(content, nameof(content));
            Argument.AssertNotNull(unwrappedStrings, nameof(unwrappedStrings));
            Argument.AssertNotNull(unwrappedCounts, nameof(unwrappedCounts));
            Argument.AssertNotNull(unwrappedItems, nameof(unwrappedItems));
            Argument.AssertNotNull(wrappedColors, nameof(wrappedColors));
            Argument.AssertNotNull(items, nameof(items));
            Argument.AssertNotNull(nestedModel, nameof(nestedModel));
            Argument.AssertNotNull(metadata, nameof(metadata));
            Argument.AssertNotNull(data, nameof(data));
            Argument.AssertNotNull(label, nameof(label));
            Argument.AssertNotNull(fooItems, nameof(fooItems));
            Argument.AssertNotNull(anotherModel, nameof(anotherModel));
            Argument.AssertNotNull(modelsWithNamespaces, nameof(modelsWithNamespaces));
            Argument.AssertNotNull(unwrappedModelsWithNamespaces, nameof(unwrappedModelsWithNamespaces));
            Argument.AssertNotNull(listOfListFoo, nameof(listOfListFoo));
            Argument.AssertNotNull(dictionaryFoo, nameof(dictionaryFoo));
            Argument.AssertNotNull(dictionaryOfDictionaryFoo, nameof(dictionaryOfDictionaryFoo));
            Argument.AssertNotNull(dictionaryListFoo, nameof(dictionaryListFoo));
            Argument.AssertNotNull(listOfDictionaryFoo, nameof(listOfDictionaryFoo));

            Name = name;
            Age = age;
            Enabled = enabled;
            Score = score;
            NullableString = nullableString;
            Id = id;
            Version = version;
            IsActive = isActive;
            OriginalName = originalName;
            XmlIdentifier = xmlIdentifier;
            Content = content;
            UnwrappedStrings = unwrappedStrings.ToList();
            UnwrappedCounts = unwrappedCounts.ToList();
            UnwrappedItems = unwrappedItems.ToList();
            WrappedColors = wrappedColors.ToList();
            Items = items.ToList();
            NestedModel = nestedModel;
            Metadata = metadata;
            CreatedAt = createdAt;
            Duration = duration;
            Data = data;
            OptionalRecordUnknown = new ChangeTrackingDictionary<string, BinaryData>();
            FixedEnum = fixedEnum;
            ExtensibleEnum = extensibleEnum;
            Label = label;
            DaysUsed = daysUsed;
            FooItems = fooItems.ToList();
            AnotherModel = anotherModel;
            ModelsWithNamespaces = modelsWithNamespaces.ToList();
            UnwrappedModelsWithNamespaces = unwrappedModelsWithNamespaces.ToList();
            ListOfListFoo = listOfListFoo.ToList();
            DictionaryFoo = dictionaryFoo;
            DictionaryOfDictionaryFoo = dictionaryOfDictionaryFoo;
            DictionaryListFoo = dictionaryListFoo;
            ListOfDictionaryFoo = listOfDictionaryFoo.ToList();
        }

        /// <summary> Initializes a new instance of <see cref="XmlAdvancedModel"/>. </summary>
        /// <param name="name"> A simple string property. </param>
        /// <param name="age"> An integer property. </param>
        /// <param name="enabled"> A boolean property. </param>
        /// <param name="score"> A float property. </param>
        /// <param name="optionalString"> An optional string. </param>
        /// <param name="optionalInt"> An optional integer. </param>
        /// <param name="nullableString"> A nullable string. </param>
        /// <param name="id"> A string as XML attribute. </param>
        /// <param name="version"> An integer as XML attribute. </param>
        /// <param name="isActive"> A boolean as XML attribute. </param>
        /// <param name="originalName"> A property with a custom XML element name. </param>
        /// <param name="xmlIdentifier"> An attribute with a custom XML name. </param>
        /// <param name="content"> Text content in the element (unwrapped string). </param>
        /// <param name="unwrappedStrings"> An unwrapped array of strings - items appear directly without wrapper. </param>
        /// <param name="unwrappedCounts"> An unwrapped array of integers. </param>
        /// <param name="unwrappedItems"> An unwrapped array of models. </param>
        /// <param name="wrappedColors"> A wrapped array of strings (default). </param>
        /// <param name="items"> A wrapped array with custom wrapper name. </param>
        /// <param name="nestedModel"> A nested model property. </param>
        /// <param name="optionalNestedModel"> An optional nested model. </param>
        /// <param name="metadata"> A dictionary property. </param>
        /// <param name="createdAt"> A date-time property. </param>
        /// <param name="duration"> A duration property. </param>
        /// <param name="data"> A bytes property. </param>
        /// <param name="optionalRecordUnknown"> optional record of unknown. </param>
        /// <param name="fixedEnum"> A fixed enum property. </param>
        /// <param name="extensibleEnum"> An extensible enum property. </param>
        /// <param name="optionalFixedEnum"> An optional fixed enum property. </param>
        /// <param name="optionalExtensibleEnum"> An optional extensible enum property. </param>
        /// <param name="label"></param>
        /// <param name="daysUsed"></param>
        /// <param name="fooItems"></param>
        /// <param name="anotherModel"></param>
        /// <param name="modelsWithNamespaces"></param>
        /// <param name="unwrappedModelsWithNamespaces"></param>
        /// <param name="listOfListFoo"></param>
        /// <param name="dictionaryFoo"></param>
        /// <param name="dictionaryOfDictionaryFoo"></param>
        /// <param name="dictionaryListFoo"></param>
        /// <param name="listOfDictionaryFoo"></param>
        /// <param name="additionalBinaryDataProperties"> Keeps track of any properties unknown to the library. </param>
        internal XmlAdvancedModel(string name, int age, bool enabled, float score, string optionalString, int? optionalInt, string nullableString, string id, int version, bool isActive, string originalName, string xmlIdentifier, string content, IList<string> unwrappedStrings, IList<int> unwrappedCounts, IList<XmlItem> unwrappedItems, IList<string> wrappedColors, IList<XmlItem> items, XmlNestedModel nestedModel, XmlNestedModel optionalNestedModel, IDictionary<string, string> metadata, DateTimeOffset createdAt, TimeSpan duration, BinaryData data, IDictionary<string, BinaryData> optionalRecordUnknown, StringFixedEnum fixedEnum, StringExtensibleEnum extensibleEnum, IntFixedEnum? optionalFixedEnum, IntExtensibleEnum? optionalExtensibleEnum, string label, int daysUsed, IList<string> fooItems, XmlNestedModel anotherModel, IList<XmlModelWithNamespace> modelsWithNamespaces, IList<XmlModelWithNamespace> unwrappedModelsWithNamespaces, IList<IList<XmlItem>> listOfListFoo, IDictionary<string, XmlItem> dictionaryFoo, IDictionary<string, IDictionary<string, XmlItem>> dictionaryOfDictionaryFoo, IDictionary<string, IList<XmlItem>> dictionaryListFoo, IList<IDictionary<string, XmlItem>> listOfDictionaryFoo, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            Name = name;
            Age = age;
            Enabled = enabled;
            Score = score;
            OptionalString = optionalString;
            OptionalInt = optionalInt;
            NullableString = nullableString;
            Id = id;
            Version = version;
            IsActive = isActive;
            OriginalName = originalName;
            XmlIdentifier = xmlIdentifier;
            Content = content;
            UnwrappedStrings = unwrappedStrings;
            UnwrappedCounts = unwrappedCounts;
            UnwrappedItems = unwrappedItems;
            WrappedColors = wrappedColors;
            Items = items;
            NestedModel = nestedModel;
            OptionalNestedModel = optionalNestedModel;
            Metadata = metadata;
            CreatedAt = createdAt;
            Duration = duration;
            Data = data;
            OptionalRecordUnknown = optionalRecordUnknown;
            FixedEnum = fixedEnum;
            ExtensibleEnum = extensibleEnum;
            OptionalFixedEnum = optionalFixedEnum;
            OptionalExtensibleEnum = optionalExtensibleEnum;
            Label = label;
            DaysUsed = daysUsed;
            FooItems = fooItems;
            AnotherModel = anotherModel;
            ModelsWithNamespaces = modelsWithNamespaces;
            UnwrappedModelsWithNamespaces = unwrappedModelsWithNamespaces;
            ListOfListFoo = listOfListFoo;
            DictionaryFoo = dictionaryFoo;
            DictionaryOfDictionaryFoo = dictionaryOfDictionaryFoo;
            DictionaryListFoo = dictionaryListFoo;
            ListOfDictionaryFoo = listOfDictionaryFoo;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        /// <summary> A simple string property. </summary>
        public string Name { get; set; }

        /// <summary> An integer property. </summary>
        public int Age { get; set; }

        /// <summary> A boolean property. </summary>
        public bool Enabled { get; set; }

        /// <summary> A float property. </summary>
        public float Score { get; set; }

        /// <summary> An optional string. </summary>
        public string OptionalString { get; set; }

        /// <summary> An optional integer. </summary>
        public int? OptionalInt { get; set; }

        /// <summary> A nullable string. </summary>
        public string NullableString { get; set; }

        /// <summary> A string as XML attribute. </summary>
        public string Id { get; set; }

        /// <summary> An integer as XML attribute. </summary>
        public int Version { get; set; }

        /// <summary> A boolean as XML attribute. </summary>
        public bool IsActive { get; set; }

        /// <summary> A property with a custom XML element name. </summary>
        public string OriginalName { get; set; }

        /// <summary> An attribute with a custom XML name. </summary>
        public string XmlIdentifier { get; set; }

        /// <summary> Text content in the element (unwrapped string). </summary>
        public string Content { get; set; }

        /// <summary> An unwrapped array of strings - items appear directly without wrapper. </summary>
        public IList<string> UnwrappedStrings { get; }

        /// <summary> An unwrapped array of integers. </summary>
        public IList<int> UnwrappedCounts { get; }

        /// <summary> An unwrapped array of models. </summary>
        public IList<XmlItem> UnwrappedItems { get; }

        /// <summary> A wrapped array of strings (default). </summary>
        public IList<string> WrappedColors { get; }

        /// <summary> A wrapped array with custom wrapper name. </summary>
        public IList<XmlItem> Items { get; }

        /// <summary> A nested model property. </summary>
        public XmlNestedModel NestedModel { get; set; }

        /// <summary> An optional nested model. </summary>
        public XmlNestedModel OptionalNestedModel { get; set; }

        /// <summary> A dictionary property. </summary>
        public IDictionary<string, string> Metadata { get; }

        /// <summary> A date-time property. </summary>
        public DateTimeOffset CreatedAt { get; set; }

        /// <summary> A duration property. </summary>
        public TimeSpan Duration { get; set; }

        /// <summary>
        /// A bytes property
        /// <para>
        /// To assign a byte[] to this property use <see cref="BinaryData.FromBytes(byte[])"/>.
        /// The byte[] will be serialized to a Base64 encoded string.
        /// </para>
        /// <para>
        /// Examples:
        /// <list type="bullet">
        /// <item>
        /// <term> BinaryData.FromBytes(new byte[] { 1, 2, 3 }). </term>
        /// <description> Creates a payload of "AQID". </description>
        /// </item>
        /// </list>
        /// </para>
        /// </summary>
        public BinaryData Data { get; set; }

        /// <summary>
        /// optional record of unknown
        /// <para> To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, JsonSerializerOptions?)"/>. </para>
        /// <para> To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>. </para>
        /// <para>
        /// Examples:
        /// <list type="bullet">
        /// <item>
        /// <term> BinaryData.FromObjectAsJson("foo"). </term>
        /// <description> Creates a payload of "foo". </description>
        /// </item>
        /// <item>
        /// <term> BinaryData.FromString("\"foo\""). </term>
        /// <description> Creates a payload of "foo". </description>
        /// </item>
        /// <item>
        /// <term> BinaryData.FromObjectAsJson(new { key = "value" }). </term>
        /// <description> Creates a payload of { "key": "value" }. </description>
        /// </item>
        /// <item>
        /// <term> BinaryData.FromString("{\"key\": \"value\"}"). </term>
        /// <description> Creates a payload of { "key": "value" }. </description>
        /// </item>
        /// </list>
        /// </para>
        /// </summary>
        public IDictionary<string, BinaryData> OptionalRecordUnknown { get; }

        /// <summary> A fixed enum property. </summary>
        public StringFixedEnum FixedEnum { get; set; }

        /// <summary> An extensible enum property. </summary>
        public StringExtensibleEnum ExtensibleEnum { get; set; }

        /// <summary> An optional fixed enum property. </summary>
        public IntFixedEnum? OptionalFixedEnum { get; set; }

        /// <summary> An optional extensible enum property. </summary>
        public IntExtensibleEnum? OptionalExtensibleEnum { get; set; }

        /// <summary> Gets or sets the Label. </summary>
        public string Label { get; set; }

        /// <summary> Gets or sets the DaysUsed. </summary>
        public int DaysUsed { get; set; }

        /// <summary> Gets the FooItems. </summary>
        public IList<string> FooItems { get; }

        /// <summary> Gets or sets the AnotherModel. </summary>
        public XmlNestedModel AnotherModel { get; set; }

        /// <summary> Gets the ModelsWithNamespaces. </summary>
        public IList<XmlModelWithNamespace> ModelsWithNamespaces { get; }

        /// <summary> Gets the UnwrappedModelsWithNamespaces. </summary>
        public IList<XmlModelWithNamespace> UnwrappedModelsWithNamespaces { get; }

        /// <summary> Gets the ListOfListFoo. </summary>
        public IList<IList<XmlItem>> ListOfListFoo { get; }

        /// <summary> Gets the DictionaryFoo. </summary>
        public IDictionary<string, XmlItem> DictionaryFoo { get; }

        /// <summary> Gets the DictionaryOfDictionaryFoo. </summary>
        public IDictionary<string, IDictionary<string, XmlItem>> DictionaryOfDictionaryFoo { get; }

        /// <summary> Gets the DictionaryListFoo. </summary>
        public IDictionary<string, IList<XmlItem>> DictionaryListFoo { get; }

        /// <summary> Gets the ListOfDictionaryFoo. </summary>
        public IList<IDictionary<string, XmlItem>> ListOfDictionaryFoo { get; }
    }
}
