// <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.Formats.Dataset>? _Dataset; /// <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.Formats.Dataset> Dataset #nullable enable annotations { get => _Dataset ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset> Create_Dataset(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset> { ObjectCreator = null, ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset((global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>)args[0], (global::System.DateTime)args[1], (string)args[2]), PropertyMetadataInitializer = _ => DatasetPropInit(options), ConstructorParameterMetadataInitializer = DatasetCtorParamInit, ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>), typeof(global::System.DateTime), typeof(string)}, modifiers: null), SerializeHandler = DatasetSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] DatasetPropInit(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.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)obj).ScenarioRunResults, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ScenarioRunResults", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset).GetProperty("ScenarioRunResults", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>), global::System.Array.Empty<global::System.Type>(), null), }; properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>>(options, info0); properties[0].IsGetNullable = false; var info1 = 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.Formats.Dataset), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)obj).CreatedAt, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "CreatedAt", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTime), global::System.Array.Empty<global::System.Type>(), null), }; properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTime>(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.Evaluation.Reporting.Formats.Dataset), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)obj).GeneratorVersion, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "GeneratorVersion", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset).GetProperty("GeneratorVersion", 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 DatasetSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult> __value_ScenarioRunResults = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)value).ScenarioRunResults; if (__value_ScenarioRunResults is not null) { writer.WritePropertyName(PropName_scenarioRunResults); IListScenarioRunResultSerializeHandler(writer, __value_ScenarioRunResults); } writer.WriteString(PropName_createdAt, ((global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)value).CreatedAt); string __value_GeneratorVersion = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.Formats.Dataset)value).GeneratorVersion; if (__value_GeneratorVersion is not null) { writer.WriteString(PropName_generatorVersion, __value_GeneratorVersion); } writer.WriteEndObject(); } private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] DatasetCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] { new() { Name = "scenarioRunResults", ParameterType = typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult>), Position = 0, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "createdAt", ParameterType = typeof(global::System.DateTime), Position = 1, HasDefaultValue = false, DefaultValue = null, IsNullable = false, }, new() { Name = "generatorVersion", ParameterType = typeof(string), Position = 2, HasDefaultValue = false, DefaultValue = null, IsNullable = true, }, }; } } }