File: JsonSourceGenerationContext.DoctorCheckResponse.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.DoctorCheckResponse>? _DoctorCheckResponse;
        
        /// <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.DoctorCheckResponse> DoctorCheckResponse
        #nullable enable annotations
        {
            get => _DoctorCheckResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse> Create_DoctorCheckResponse(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse(){ Checks = (global::System.Collections.Generic.List<global::Aspire.Cli.Utils.EnvironmentChecker.EnvironmentCheckResult>)args[0], Summary = (global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary)args[1] },
                    PropertyMetadataInitializer = _ => DoctorCheckResponsePropInit(options),
                    ConstructorParameterMetadataInitializer = DoctorCheckResponseCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = DoctorCheckResponseSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] DoctorCheckResponsePropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[2];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Utils.EnvironmentChecker.EnvironmentCheckResult>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse)obj).Checks,
                Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse)obj).Checks = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Checks",
                JsonPropertyName = "checks",
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse).GetProperty("Checks", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Utils.EnvironmentChecker.EnvironmentCheckResult>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Utils.EnvironmentChecker.EnvironmentCheckResult>>(options, info0);
            properties[0].IsRequired = true;
            properties[0].IsGetNullable = false;
            properties[0].IsSetNullable = false;
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse)obj).Summary,
                Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse)obj).Summary = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Summary",
                JsonPropertyName = "summary",
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse).GetProperty("Summary", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary>(options, info1);
            properties[1].IsRequired = true;
            properties[1].IsGetNullable = false;
            properties[1].IsSetNullable = false;
 
            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 DoctorCheckResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WritePropertyName(PropName_checks);
            ListEnvironmentCheckResultSerializeHandler(writer, ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse)value).Checks);
            writer.WritePropertyName(PropName_summary);
            DoctorCheckSummarySerializeHandler(writer, ((global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckResponse)value).Summary);
 
            writer.WriteEndObject();
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] DoctorCheckResponseCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "Checks",
                ParameterType = typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Utils.EnvironmentChecker.EnvironmentCheckResult>),
                Position = 0,
                IsNullable = false,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "Summary",
                ParameterType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.DoctorCheckSummary),
                Position = 1,
                IsNullable = false,
                IsMemberInitializer = true,
            },
        };
    }
}