File: BackchannelJsonSerializerContext.CapabilitiesInfo.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.Backchannel
{
    internal partial class BackchannelJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo>? _CapabilitiesInfo;
        
        /// <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.Commands.Sdk.CapabilitiesInfo> CapabilitiesInfo
        #nullable enable annotations
        {
            get => _CapabilitiesInfo ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo> Create_CapabilitiesInfo(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo>
                {
                    ObjectCreator = () => new global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => CapabilitiesInfoPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = CapabilitiesInfoSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] CapabilitiesInfoPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[5];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).Capabilities,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).Capabilities = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Capabilities",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo).GetProperty("Capabilities", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>), 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.Commands.Sdk.CapabilityInfo>>(options, info0);
            properties[0].IsGetNullable = false;
            properties[0].IsSetNullable = false;
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.HandleTypeInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).HandleTypes,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).HandleTypes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "HandleTypes",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo).GetProperty("HandleTypes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.HandleTypeInfo>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.HandleTypeInfo>>(options, info1);
            properties[1].IsGetNullable = false;
            properties[1].IsSetNullable = false;
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.DtoTypeInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).DtoTypes,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).DtoTypes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "DtoTypes",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo).GetProperty("DtoTypes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.DtoTypeInfo>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.DtoTypeInfo>>(options, info2);
            properties[2].IsGetNullable = false;
            properties[2].IsSetNullable = false;
 
            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.EnumTypeInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).EnumTypes,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).EnumTypes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "EnumTypes",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo).GetProperty("EnumTypes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.EnumTypeInfo>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.EnumTypeInfo>>(options, info3);
            properties[3].IsGetNullable = false;
            properties[3].IsSetNullable = false;
 
            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.DiagnosticInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).Diagnostics,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)obj).Diagnostics = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Diagnostics",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo).GetProperty("Diagnostics", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.DiagnosticInfo>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.DiagnosticInfo>>(options, info4);
            properties[4].IsGetNullable = false;
            properties[4].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 CapabilitiesInfoSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WritePropertyName(PropName_Capabilities);
            ListCapabilityInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)value).Capabilities);
            writer.WritePropertyName(PropName_HandleTypes);
            ListHandleTypeInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)value).HandleTypes);
            writer.WritePropertyName(PropName_DtoTypes);
            ListDtoTypeInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)value).DtoTypes);
            writer.WritePropertyName(PropName_EnumTypes);
            ListEnumTypeInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)value).EnumTypes);
            writer.WritePropertyName(PropName_Diagnostics);
            ListDiagnosticInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.CapabilitiesInfo)value).Diagnostics);
 
            writer.WriteEndObject();
        }
    }
}