// <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.Evaluation.Reporting.JsonSerialization { internal static partial class JsonUtilities { private sealed partial class JsonContext { private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>? _ScenarioRunResult; /// <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.Evaluation.Reporting.ScenarioRunResult> ScenarioRunResult #nullable enable annotations { get => _ScenarioRunResult ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult> Create_ScenarioRunResult(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult> { ObjectCreator = null, ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult((string)args[0], (string)args[1], (string)args[2], (global::System.DateTime)args[3], (global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>)args[4], (global::Microsoft.Extensions.AI.ChatResponse)args[5], (global::Microsoft.Extensions.AI.Evaluation.EvaluationResult)args[6], (global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails)args[7], (global::System.Collections.Generic.IList<string>)args[8], (int?)args[9]), PropertyMetadataInitializer = _ => ScenarioRunResultPropInit(options), ConstructorParameterMetadataInitializer = ScenarioRunResultCtorParamInit, ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(global::System.DateTime), typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), typeof(global::Microsoft.Extensions.AI.ChatResponse), typeof(global::Microsoft.Extensions.AI.Evaluation.EvaluationResult), typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails), typeof(global::System.Collections.Generic.IList<string>), typeof(int?)}, modifiers: null), SerializeHandler = ScenarioRunResultSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ScenarioRunResultPropInit(global::System.Text.Json.JsonSerializerOptions options) { var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[10]; var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ScenarioName, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ScenarioName = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ScenarioName", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("ScenarioName", 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); properties[0].IsGetNullable = false; properties[0].IsSetNullable = false; var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).IterationName, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).IterationName = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "IterationName", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("IterationName", 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); properties[1].IsGetNullable = false; properties[1].IsSetNullable = false; var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ExecutionName, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ExecutionName = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ExecutionName", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("ExecutionName", 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); properties[2].IsGetNullable = false; properties[2].IsSetNullable = false; var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTime> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).CreationTime, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).CreationTime = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "CreationTime", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("CreationTime", InstanceMemberBindingFlags, null, typeof(global::System.DateTime), global::System.Array.Empty<global::System.Type>(), null), }; properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTime>(options, info3); var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).Messages, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).Messages = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Messages", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), global::System.Array.Empty<global::System.Type>(), null), }; properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>>(options, info4); properties[4].IsGetNullable = false; properties[4].IsSetNullable = false; var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ChatResponse> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ModelResponse, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ModelResponse = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ModelResponse", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("ModelResponse", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatResponse), global::System.Array.Empty<global::System.Type>(), null), }; properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, info5); properties[5].IsGetNullable = false; properties[5].IsSetNullable = false; var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.Evaluation.EvaluationResult> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).EvaluationResult, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).EvaluationResult = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "EvaluationResult", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("EvaluationResult", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.Evaluation.EvaluationResult), global::System.Array.Empty<global::System.Type>(), null), }; properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.Evaluation.EvaluationResult>(options, info6); properties[6].IsGetNullable = false; properties[6].IsSetNullable = false; var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ChatDetails, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).ChatDetails = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ChatDetails", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("ChatDetails", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails), global::System.Array.Empty<global::System.Type>(), null), }; properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails>(options, info7); var info8 = 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.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).Tags, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).Tags = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Tags", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("Tags", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<string>), global::System.Array.Empty<global::System.Type>(), null), }; properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IList<string>>(options, info8); var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).FormatVersion, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)obj).FormatVersion = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "FormatVersion", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("FormatVersion", InstanceMemberBindingFlags, null, typeof(int?), global::System.Array.Empty<global::System.Type>(), null), }; properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int?>(options, info9); 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 ScenarioRunResultSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); string __value_ScenarioName = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).ScenarioName; if (__value_ScenarioName is not null) { writer.WriteString(PropName_scenarioName, __value_ScenarioName); } string __value_IterationName = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).IterationName; if (__value_IterationName is not null) { writer.WriteString(PropName_iterationName, __value_IterationName); } string __value_ExecutionName = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).ExecutionName; if (__value_ExecutionName is not null) { writer.WriteString(PropName_executionName, __value_ExecutionName); } writer.WriteString(PropName_creationTime, ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).CreationTime); global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage> __value_Messages = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).Messages; if (__value_Messages is not null) { writer.WritePropertyName(PropName_messages); IListChatMessageSerializeHandler(writer, __value_Messages); } global::Microsoft.Extensions.AI.ChatResponse __value_ModelResponse = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).ModelResponse; if (__value_ModelResponse is not null) { writer.WritePropertyName(PropName_modelResponse); global::System.Text.Json.JsonSerializer.Serialize(writer, __value_ModelResponse, ChatResponse); } global::Microsoft.Extensions.AI.Evaluation.EvaluationResult __value_EvaluationResult = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).EvaluationResult; if (__value_EvaluationResult is not null) { writer.WritePropertyName(PropName_evaluationResult); EvaluationResultSerializeHandler(writer, __value_EvaluationResult); } global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails __value_ChatDetails = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).ChatDetails; if (__value_ChatDetails is not null) { writer.WritePropertyName(PropName_chatDetails); ChatDetailsSerializeHandler(writer, __value_ChatDetails); } global::System.Collections.Generic.IList<string> __value_Tags = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).Tags; if (__value_Tags is not null) { writer.WritePropertyName(PropName_tags); IListStringSerializeHandler(writer, __value_Tags); } int? __value_FormatVersion = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).FormatVersion; if (__value_FormatVersion is not null) { writer.WritePropertyName(PropName_formatVersion); global::System.Text.Json.JsonSerializer.Serialize(writer, __value_FormatVersion, NullableInt32); } writer.WriteEndObject(); } private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ScenarioRunResultCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] { new() { Name = "scenarioName", ParameterType = typeof(string), Position = 0, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "iterationName", ParameterType = typeof(string), Position = 1, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "executionName", ParameterType = typeof(string), Position = 2, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "creationTime", ParameterType = typeof(global::System.DateTime), Position = 3, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "messages", ParameterType = typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), Position = 4, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "modelResponse", ParameterType = typeof(global::Microsoft.Extensions.AI.ChatResponse), Position = 5, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "evaluationResult", ParameterType = typeof(global::Microsoft.Extensions.AI.Evaluation.EvaluationResult), Position = 6, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "chatDetails", ParameterType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails), Position = 7, HasDefaultValue = true, DefaultValue = default(global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails), IsNullable = true, }, new() { Name = "tags", ParameterType = typeof(global::System.Collections.Generic.IList<string>), Position = 8, HasDefaultValue = true, DefaultValue = default(global::System.Collections.Generic.IList<string>), IsNullable = true, }, new() { Name = "formatVersion", ParameterType = typeof(int?), Position = 9, HasDefaultValue = true, DefaultValue = default(int?), IsNullable = true, }, }; } } }