File: JsonSourceGenerationContext.DoctorCheckSummary.g.cs
Project: src\src\Aspire.Cli\Aspire.Cli.Tool.csproj (aspire)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Aspire.Cli
{
    internal partial class JsonSourceGenerationContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>? _DoctorCheckSummary;
        
        /// <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::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary> DoctorCheckSummary
        #nullable enable annotations
        {
            get => _DoctorCheckSummary ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary> Create_DoctorCheckSummary(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>
                {
                    ObjectCreator = () => new global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => DoctorCheckSummaryPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = DoctorCheckSummarySerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] DoctorCheckSummaryPropInit(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<int>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)obj).Passed,
                Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)obj).Passed = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Passed",
                JsonPropertyName = "passed",
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary).GetProperty("Passed", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info0);
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)obj).Warnings,
                Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)obj).Warnings = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Warnings",
                JsonPropertyName = "warnings",
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary).GetProperty("Warnings", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info1);
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)obj).Failed,
                Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)obj).Failed = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Failed",
                JsonPropertyName = "failed",
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary).GetProperty("Failed", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(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 DoctorCheckSummarySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WriteNumber(PropName_passed, ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)value).Passed);
            writer.WriteNumber(PropName_warnings, ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)value).Warnings);
            writer.WriteNumber(PropName_failed, ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)value).Failed);
 
            writer.WriteEndObject();
        }
    }
}