// <auto-generated/> #nullable enable annotations #nullable disable warnings // Suppress warnings about [Obsolete] member usage in generated code. #pragma warning disable CS0612, CS0618 namespace Microsoft.Extensions.AI { internal sealed partial class TestJsonSerializerContext { private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatOptions>? _ChatOptions; /// <summary> /// Defines the source generated JSON serialization contract metadata for a given type. /// </summary> #nullable disable annotations // Marking the property type as nullable-oblivious. public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatOptions> ChatOptions #nullable enable annotations { get => _ChatOptions ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatOptions>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatOptions)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatOptions> Create_ChatOptions(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatOptions>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatOptions> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatOptions> { ObjectCreator = () => new global::Microsoft.Extensions.AI.ChatOptions(), ObjectWithParameterizedConstructorCreator = null, PropertyMetadataInitializer = _ => ChatOptionsPropInit(options), ConstructorParameterMetadataInitializer = null, ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), SerializeHandler = ChatOptionsSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatOptions>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ChatOptionsPropInit(global::System.Text.Json.JsonSerializerOptions options) { var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[20]; var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ConversationId, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ConversationId = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ConversationId", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("ConversationId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), }; properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0); var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Instructions, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Instructions = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Instructions", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("Instructions", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), }; properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1); var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<float?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Temperature, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Temperature = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Temperature", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("Temperature", InstanceMemberBindingFlags, null, typeof(float?), global::System.Array.Empty<global::System.Type>(), null), }; properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<float?>(options, info2); var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).MaxOutputTokens, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).MaxOutputTokens = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "MaxOutputTokens", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("MaxOutputTokens", InstanceMemberBindingFlags, null, typeof(int?), global::System.Array.Empty<global::System.Type>(), null), }; properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int?>(options, info3); var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<float?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).TopP, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).TopP = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "TopP", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("TopP", InstanceMemberBindingFlags, null, typeof(float?), global::System.Array.Empty<global::System.Type>(), null), }; properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<float?>(options, info4); var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).TopK, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).TopK = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "TopK", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("TopK", InstanceMemberBindingFlags, null, typeof(int?), global::System.Array.Empty<global::System.Type>(), null), }; properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int?>(options, info5); var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<float?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).FrequencyPenalty, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).FrequencyPenalty = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "FrequencyPenalty", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("FrequencyPenalty", InstanceMemberBindingFlags, null, typeof(float?), global::System.Array.Empty<global::System.Type>(), null), }; properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<float?>(options, info6); var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<float?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).PresencePenalty, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).PresencePenalty = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "PresencePenalty", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("PresencePenalty", InstanceMemberBindingFlags, null, typeof(float?), global::System.Array.Empty<global::System.Type>(), null), }; properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<float?>(options, info7); var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<long?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Seed, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Seed = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Seed", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("Seed", InstanceMemberBindingFlags, null, typeof(long?), global::System.Array.Empty<global::System.Type>(), null), }; properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long?>(options, info8); var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ReasoningOptions> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Reasoning, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).Reasoning = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Reasoning", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("Reasoning", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ReasoningOptions), global::System.Array.Empty<global::System.Type>(), null), }; properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ReasoningOptions>(options, info9); var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ChatResponseFormat> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ResponseFormat, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ResponseFormat = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ResponseFormat", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("ResponseFormat", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatResponseFormat), global::System.Array.Empty<global::System.Type>(), null), }; properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ChatResponseFormat>(options, info10); var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ModelId, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ModelId = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ModelId", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), }; properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info11); var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IList<string>> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).StopSequences, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).StopSequences = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "StopSequences", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("StopSequences", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<string>), global::System.Array.Empty<global::System.Type>(), null), }; properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IList<string>>(options, info12); var info13 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).AllowMultipleToolCalls, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).AllowMultipleToolCalls = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "AllowMultipleToolCalls", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("AllowMultipleToolCalls", InstanceMemberBindingFlags, null, typeof(bool?), global::System.Array.Empty<global::System.Type>(), null), }; properties[13] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool?>(options, info13); var info14 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ChatToolMode> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ToolMode, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ToolMode = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ToolMode", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("ToolMode", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatToolMode), global::System.Array.Empty<global::System.Type>(), null), }; properties[14] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ChatToolMode>(options, info14); var info15 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<object> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = null, Setter = null, IgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.Always, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Tools", JsonPropertyName = null, AttributeProviderFactory = static () => null, }; properties[15] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<object>(options, info15); var info16 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).AllowBackgroundResponses, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).AllowBackgroundResponses = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "AllowBackgroundResponses", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("AllowBackgroundResponses", InstanceMemberBindingFlags, null, typeof(bool?), global::System.Array.Empty<global::System.Type>(), null), }; properties[16] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool?>(options, info16); var info17 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ResponseContinuationToken> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ContinuationToken, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).ContinuationToken = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ContinuationToken", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("ContinuationToken", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ResponseContinuationToken), global::System.Array.Empty<global::System.Type>(), null), }; properties[17] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ResponseContinuationToken>(options, info17); var info18 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<object> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = null, Setter = null, IgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.Always, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "RawRepresentationFactory", JsonPropertyName = null, AttributeProviderFactory = static () => null, }; properties[18] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<object>(options, info18); var info19 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatOptions), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatOptions)obj).AdditionalProperties, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatOptions)obj).AdditionalProperties = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "AdditionalProperties", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatOptions).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null), }; properties[19] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary>(options, info19); return properties; } // Intentionally not a static method because we create a delegate to it. Invoking delegates to instance // methods is almost as fast as virtual calls. Static methods need to go through a shuffle thunk. private void ChatOptionsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.ChatOptions? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); writer.WriteString(PropName_ConversationId, ((global::Microsoft.Extensions.AI.ChatOptions)value).ConversationId); writer.WriteString(PropName_Instructions, ((global::Microsoft.Extensions.AI.ChatOptions)value).Instructions); writer.WritePropertyName(PropName_Temperature); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).Temperature, NullableSingle); writer.WritePropertyName(PropName_MaxOutputTokens); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).MaxOutputTokens, NullableInt32); writer.WritePropertyName(PropName_TopP); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).TopP, NullableSingle); writer.WritePropertyName(PropName_TopK); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).TopK, NullableInt32); writer.WritePropertyName(PropName_FrequencyPenalty); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).FrequencyPenalty, NullableSingle); writer.WritePropertyName(PropName_PresencePenalty); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).PresencePenalty, NullableSingle); writer.WritePropertyName(PropName_Seed); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).Seed, NullableInt64); writer.WritePropertyName(PropName_Reasoning); ReasoningOptionsSerializeHandler(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).Reasoning); writer.WritePropertyName(PropName_ResponseFormat); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).ResponseFormat, ChatResponseFormat); writer.WriteString(PropName_ModelId, ((global::Microsoft.Extensions.AI.ChatOptions)value).ModelId); writer.WritePropertyName(PropName_StopSequences); IListStringSerializeHandler(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).StopSequences); writer.WritePropertyName(PropName_AllowMultipleToolCalls); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).AllowMultipleToolCalls, NullableBoolean); writer.WritePropertyName(PropName_ToolMode); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).ToolMode, ChatToolMode); writer.WritePropertyName(PropName_AllowBackgroundResponses); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).AllowBackgroundResponses, NullableBoolean); writer.WritePropertyName(PropName_ContinuationToken); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).ContinuationToken, ResponseContinuationToken); writer.WritePropertyName(PropName_AdditionalProperties); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.Extensions.AI.ChatOptions)value).AdditionalProperties, AdditionalPropertiesDictionary); writer.WriteEndObject(); } } }