// <auto-generated/>

#nullable disable

using System;
using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.Text.Json;
using Sample.Models;

namespace Sample
{
    public partial class MockInputModel
    {
        internal static global::Sample.Models.MockInputModel DeserializeMockInputModel(global::System.Text.Json.JsonElement element, global::System.ClientModel.Primitives.ModelReaderWriterOptions options)
        {
            if ((element.ValueKind == global::System.Text.Json.JsonValueKind.Null))
            {
                return null;
            }
            string prop1 = default;
            string prop2 = default;
            global::System.Collections.Generic.IDictionary<string, global::System.BinaryData> additionalBinaryDataProperties = new global::Sample.ChangeTrackingDictionary<string, global::System.BinaryData>();
            foreach (var prop in element.EnumerateObject())
            {
                if (prop.NameEquals("prop1"u8))
                {
                    DeserializationMethod(prop, ref prop1);
                    continue;
                }
                if (prop.NameEquals("prop2"u8))
                {
                    DeserializationMethod(prop, ref prop2);
                    continue;
                }
                if ((options.Format != "W"))
                {
                    additionalBinaryDataProperties.Add(prop.Name, global::System.BinaryData.FromString(prop.Value.GetRawText()));
                }
            }
            return new global::Sample.Models.MockInputModel(prop1, prop2, additionalBinaryDataProperties);
        }
    }
}
