// <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 { public static partial class AIJsonUtilities { private sealed partial class JsonContext { private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponseFormatJson>? _ChatResponseFormatJson; /// <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.ChatResponseFormatJson> ChatResponseFormatJson #nullable enable annotations { get => _ChatResponseFormatJson ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponseFormatJson>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponseFormatJson> Create_ChatResponseFormatJson(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatResponseFormatJson>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponseFormatJson> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatResponseFormatJson> { ObjectCreator = null, ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.ChatResponseFormatJson((global::System.Text.Json.JsonElement?)args[0], (string)args[1], (string)args[2]), PropertyMetadataInitializer = _ => ChatResponseFormatJsonPropInit(options), ConstructorParameterMetadataInitializer = ChatResponseFormatJsonCtorParamInit, ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Text.Json.JsonElement?), typeof(string), typeof(string)}, modifiers: null), SerializeHandler = ChatResponseFormatJsonSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatResponseFormatJson>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ChatResponseFormatJsonPropInit(global::System.Text.Json.JsonSerializerOptions options) { var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[3]; var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Text.Json.JsonElement?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponseFormatJson)obj).Schema, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Schema", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson).GetProperty("Schema", InstanceMemberBindingFlags, null, typeof(global::System.Text.Json.JsonElement?), global::System.Array.Empty<global::System.Type>(), null), }; properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Text.Json.JsonElement?>(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.ChatResponseFormatJson), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponseFormatJson)obj).SchemaName, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "SchemaName", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson).GetProperty("SchemaName", 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<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponseFormatJson)obj).SchemaDescription, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "SchemaDescription", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponseFormatJson).GetProperty("SchemaDescription", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), }; properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2); 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 ChatResponseFormatJsonSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.ChatResponseFormatJson? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); global::System.Text.Json.JsonElement? __value_Schema = ((global::Microsoft.Extensions.AI.ChatResponseFormatJson)value).Schema; if (__value_Schema is not null) { writer.WritePropertyName(PropName_schema); global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Schema, NullableJsonElement); } string __value_SchemaName = ((global::Microsoft.Extensions.AI.ChatResponseFormatJson)value).SchemaName; if (__value_SchemaName is not null) { writer.WriteString(PropName_schemaName, __value_SchemaName); } string __value_SchemaDescription = ((global::Microsoft.Extensions.AI.ChatResponseFormatJson)value).SchemaDescription; if (__value_SchemaDescription is not null) { writer.WriteString(PropName_schemaDescription, __value_SchemaDescription); } writer.WriteEndObject(); } private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ChatResponseFormatJsonCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] { new() { Name = "schema", ParameterType = typeof(global::System.Text.Json.JsonElement?), Position = 0, HasDefaultValue = false, DefaultValue = null, IsNullable = true, }, new() { Name = "schemaName", ParameterType = typeof(string), Position = 1, HasDefaultValue = true, DefaultValue = default(string), IsNullable = true, }, new() { Name = "schemaDescription", ParameterType = typeof(string), Position = 2, HasDefaultValue = true, DefaultValue = default(string), IsNullable = true, }, }; } } }