// <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.JsonSchemaExporter { public static partial class TestTypes { public partial class TestTypesContext { private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums>? _PocoWithEnums; /// <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.JsonSchemaExporter.TestTypes.PocoWithEnums> PocoWithEnums #nullable enable annotations { get => _PocoWithEnums ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums> Create_PocoWithEnums(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums> { ObjectCreator = null, ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums(){ IntEnum = (global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum)args[0], StringEnum = (global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum)args[1] }, PropertyMetadataInitializer = _ => PocoWithEnumsPropInit(options), ConstructorParameterMetadataInitializer = PocoWithEnumsCtorParamInit, ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), SerializeHandler = null, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] PocoWithEnumsPropInit(global::System.Text.Json.JsonSerializerOptions options) { var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[6]; var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).IntEnum, Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "IntEnum", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetProperty("IntEnum", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum), global::System.Array.Empty<global::System.Type>(), null), }; properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum>(options, info0); var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).StringEnum, Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "StringEnum", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetProperty("StringEnum", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum), global::System.Array.Empty<global::System.Type>(), null), }; properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum>(options, info1); var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums), Converter = (global::System.Text.Json.Serialization.JsonConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum>)ExpandConverter(typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum), new global::System.Text.Json.Serialization.JsonStringEnumConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum>(), options), Getter = static obj => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).IntEnumUsingStringConverter, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).IntEnumUsingStringConverter = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "IntEnumUsingStringConverter", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetProperty("IntEnumUsingStringConverter", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum), global::System.Array.Empty<global::System.Type>(), null), }; properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum>(options, info2); var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums), Converter = GetConverterForNullableProperty<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum>(new global::System.Text.Json.Serialization.JsonStringEnumConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum>(), options), Getter = static obj => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).NullableIntEnumUsingStringConverter, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).NullableIntEnumUsingStringConverter = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "NullableIntEnumUsingStringConverter", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetProperty("NullableIntEnumUsingStringConverter", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum?), global::System.Array.Empty<global::System.Type>(), null), }; properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum?>(options, info3); var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums), Converter = (global::System.Text.Json.Serialization.JsonConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum>)ExpandConverter(typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum), new global::System.Text.Json.Serialization.JsonNumberEnumConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum>(), options), Getter = static obj => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).StringEnumUsingIntConverter, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).StringEnumUsingIntConverter = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "StringEnumUsingIntConverter", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetProperty("StringEnumUsingIntConverter", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum), global::System.Array.Empty<global::System.Type>(), null), }; properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum>(options, info4); var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum?> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums), Converter = GetConverterForNullableProperty<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum>(new global::System.Text.Json.Serialization.JsonNumberEnumConverter<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum>(), options), Getter = static obj => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).NullableStringEnumUsingIntConverter, Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums)obj).NullableStringEnumUsingIntConverter = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "NullableStringEnumUsingIntConverter", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.PocoWithEnums).GetProperty("NullableStringEnumUsingIntConverter", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum?), global::System.Array.Empty<global::System.Type>(), null), }; properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum?>(options, info5); return properties; } private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] PocoWithEnumsCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] { new() { Name = "IntEnum", ParameterType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.IntEnum), Position = 0, IsNullable = false, IsMemberInitializer = true, }, new() { Name = "StringEnum", ParameterType = typeof(global::Microsoft.Extensions.AI.JsonSchemaExporter.TestTypes.StringEnum), Position = 1, IsNullable = false, IsMemberInitializer = true, }, }; } } }