File: Generated\361d1da7f942c932\ProjectDataBuildJsonSerializerContext.ProjectDataBuildDiagnosticRecord.g.cs
Project: Microsoft.NET.ProjectData.Tasks.csproj (Microsoft.NET.ProjectData.Tasks)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618

namespace Microsoft.NET.ProjectData.Tasks
{
    internal sealed partial class ProjectDataBuildJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord>? _ProjectDataBuildDiagnosticRecord;
        
        /// <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.NET.ProjectData.ProjectDataBuildDiagnosticRecord> ProjectDataBuildDiagnosticRecord
        #nullable enable annotations
        {
            get => _ProjectDataBuildDiagnosticRecord ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord>)Options.GetTypeInfo(typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord> Create_ProjectDataBuildDiagnosticRecord(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord>
                {
                    ObjectCreator = () => new global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => ProjectDataBuildDiagnosticRecordPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = ProjectDataBuildDiagnosticRecordSerializeHandler,
                    PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
                    TypeClassifierFactory = null,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ProjectDataBuildDiagnosticRecordPropInit(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.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Severity,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Severity = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Severity",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Severity", 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.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Phase,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Phase = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Phase",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Phase", 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.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).ProjectFilePath,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).ProjectFilePath = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ProjectFilePath",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("ProjectFilePath", 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<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).ProjectFilePathSource,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).ProjectFilePathSource = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ProjectFilePathSource",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("ProjectFilePathSource", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
            properties[3].IsGetNullable = false;
            properties[3].IsSetNullable = false;

            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).FilePath,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).FilePath = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "FilePath",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("FilePath", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info4);
            properties[4].IsGetNullable = false;
            properties[4].IsSetNullable = false;

            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Code,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Code = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Code",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Code", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info5);
            properties[5].IsGetNullable = false;
            properties[5].IsSetNullable = false;

            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Message,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Message = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Message",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Message", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info6);
            properties[6].IsGetNullable = false;
            properties[6].IsSetNullable = false;

            var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Line,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Line = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Line",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Line", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info7);

            var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Column,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Column = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Column",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Column", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info8);

            var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.NET.ProjectData.ProjectDataBuildEventContextRecord>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord),
                Converter = null,
                Getter = static obj => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Context,
                Setter = static (obj, value) => ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)obj).Context = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Context",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord).GetProperty("Context", InstanceMemberBindingFlags, null, typeof(global::Microsoft.NET.ProjectData.ProjectDataBuildEventContextRecord), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.NET.ProjectData.ProjectDataBuildEventContextRecord>(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 ProjectDataBuildDiagnosticRecordSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();

            writer.WriteString(PropName_severity, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Severity);
            writer.WriteString(PropName_phase, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Phase);
            writer.WriteString(PropName_projectFilePath, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).ProjectFilePath);
            writer.WriteString(PropName_projectFilePathSource, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).ProjectFilePathSource);
            writer.WriteString(PropName_filePath, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).FilePath);
            writer.WriteString(PropName_code, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Code);
            writer.WriteString(PropName_message, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Message);
            writer.WriteNumber(PropName_line, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Line);
            writer.WriteNumber(PropName_column, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Column);
            writer.WritePropertyName(PropName_context);
            ProjectDataBuildEventContextRecordSerializeHandler(writer, ((global::Microsoft.NET.ProjectData.ProjectDataBuildDiagnosticRecord)value).Context);

            writer.WriteEndObject();
        }
    }
}