File: JsonSourceGenerationContext.ListIntegrationsResponse.g.cs
Project: src\src\Aspire.Cli\Aspire.Cli.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.Mcp.ListIntegrationsResponse>? _ListIntegrationsResponse;
        
        /// <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.Mcp.ListIntegrationsResponse> ListIntegrationsResponse
        #nullable enable annotations
        {
            get => _ListIntegrationsResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.ListIntegrationsResponse>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Mcp.ListIntegrationsResponse));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.ListIntegrationsResponse> Create_ListIntegrationsResponse(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Mcp.ListIntegrationsResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Mcp.ListIntegrationsResponse> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Mcp.ListIntegrationsResponse>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Mcp.ListIntegrationsResponse(){ Integrations = (global::System.Collections.Generic.List<global::Aspire.Cli.Mcp.Integration>)args[0] },
                    PropertyMetadataInitializer = _ => ListIntegrationsResponsePropInit(options),
                    ConstructorParameterMetadataInitializer = ListIntegrationsResponseCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.ListIntegrationsResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = ListIntegrationsResponseSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Mcp.ListIntegrationsResponse>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ListIntegrationsResponsePropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[1];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Mcp.Integration>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Mcp.ListIntegrationsResponse),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Mcp.ListIntegrationsResponse)obj).Integrations,
                Setter = static (obj, value) => ((global::Aspire.Cli.Mcp.ListIntegrationsResponse)obj).Integrations = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Integrations",
                JsonPropertyName = "integrations",
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Mcp.ListIntegrationsResponse).GetProperty("Integrations", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Mcp.Integration>), 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.Mcp.Integration>>(options, info0);
            properties[0].IsRequired = true;
            properties[0].IsGetNullable = false;
            properties[0].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 ListIntegrationsResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Mcp.ListIntegrationsResponse? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WritePropertyName(PropName_integrations);
            ListIntegrationSerializeHandler(writer, ((global::Aspire.Cli.Mcp.ListIntegrationsResponse)value).Integrations);
 
            writer.WriteEndObject();
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ListIntegrationsResponseCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "Integrations",
                ParameterType = typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Mcp.Integration>),
                Position = 0,
                IsNullable = false,
                IsMemberInitializer = true,
            },
        };
    }
}