File: CapabilitiesJsonContext.CapabilityInfo.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.Commands.Sdk
{
    internal partial class CapabilitiesJsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>? _CapabilityInfo;
        
        /// <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.CapabilityInfo> CapabilityInfo
        #nullable enable annotations
        {
            get => _CapabilityInfo ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilityInfo> Create_CapabilityInfo(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.CapabilityInfo> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>
                {
                    ObjectCreator = () => new global::Aspire.Cli.Commands.Sdk.CapabilityInfo(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => CapabilityInfoPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = CapabilityInfoSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Commands.Sdk.CapabilityInfo>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] CapabilityInfoPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[13];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).CapabilityId,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).CapabilityId = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "CapabilityId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("CapabilityId", 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::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).MethodName,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).MethodName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "MethodName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("MethodName", 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::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).OwningTypeName,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).OwningTypeName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "OwningTypeName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("OwningTypeName", 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);
 
            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).QualifiedMethodName,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).QualifiedMethodName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "QualifiedMethodName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("QualifiedMethodName", 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::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).Description,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).Description = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Description",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("Description", 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);
 
            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).CapabilityKind,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).CapabilityKind = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "CapabilityKind",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("CapabilityKind", 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::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).TargetTypeId,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).TargetTypeId = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TargetTypeId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("TargetTypeId", 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);
 
            var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).TargetParameterName,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).TargetParameterName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TargetParameterName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("TargetParameterName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info7);
 
            var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).ReturnsBuilder,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).ReturnsBuilder = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ReturnsBuilder",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("ReturnsBuilder", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info8);
 
            var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.ParameterInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).Parameters,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).Parameters = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Parameters",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("Parameters", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.ParameterInfo>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.ParameterInfo>>(options, info9);
            properties[9].IsGetNullable = false;
            properties[9].IsSetNullable = false;
 
            var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).ReturnType,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).ReturnType = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ReturnType",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("ReturnType", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, info10);
 
            var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).TargetType,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).TargetType = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TargetType",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("TargetType", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, info11);
 
            var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo),
                Converter = null,
                Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).ExpandedTargetTypes,
                Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)obj).ExpandedTargetTypes = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ExpandedTargetTypes",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.CapabilityInfo).GetProperty("ExpandedTargetTypes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>>(options, info12);
            properties[12].IsGetNullable = false;
            properties[12].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 CapabilityInfoSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Commands.Sdk.CapabilityInfo? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            string __value_CapabilityId = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).CapabilityId;
            if (__value_CapabilityId is not null)
            {
                writer.WriteString(PropName_CapabilityId, __value_CapabilityId);
            }
            string __value_MethodName = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).MethodName;
            if (__value_MethodName is not null)
            {
                writer.WriteString(PropName_MethodName, __value_MethodName);
            }
            string __value_OwningTypeName = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).OwningTypeName;
            if (__value_OwningTypeName is not null)
            {
                writer.WriteString(PropName_OwningTypeName, __value_OwningTypeName);
            }
            string __value_QualifiedMethodName = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).QualifiedMethodName;
            if (__value_QualifiedMethodName is not null)
            {
                writer.WriteString(PropName_QualifiedMethodName, __value_QualifiedMethodName);
            }
            string __value_Description = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).Description;
            if (__value_Description is not null)
            {
                writer.WriteString(PropName_Description, __value_Description);
            }
            string __value_CapabilityKind = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).CapabilityKind;
            if (__value_CapabilityKind is not null)
            {
                writer.WriteString(PropName_CapabilityKind, __value_CapabilityKind);
            }
            string __value_TargetTypeId = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).TargetTypeId;
            if (__value_TargetTypeId is not null)
            {
                writer.WriteString(PropName_TargetTypeId, __value_TargetTypeId);
            }
            string __value_TargetParameterName = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).TargetParameterName;
            if (__value_TargetParameterName is not null)
            {
                writer.WriteString(PropName_TargetParameterName, __value_TargetParameterName);
            }
            writer.WriteBoolean(PropName_ReturnsBuilder, ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).ReturnsBuilder);
            global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.ParameterInfo> __value_Parameters = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).Parameters;
            if (__value_Parameters is not null)
            {
                writer.WritePropertyName(PropName_Parameters);
                ListParameterInfoSerializeHandler(writer, __value_Parameters);
            }
            global::Aspire.Cli.Commands.Sdk.TypeRefInfo __value_ReturnType = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).ReturnType;
            if (__value_ReturnType is not null)
            {
                writer.WritePropertyName(PropName_ReturnType);
                TypeRefInfoSerializeHandler(writer, __value_ReturnType);
            }
            global::Aspire.Cli.Commands.Sdk.TypeRefInfo __value_TargetType = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).TargetType;
            if (__value_TargetType is not null)
            {
                writer.WritePropertyName(PropName_TargetType);
                TypeRefInfoSerializeHandler(writer, __value_TargetType);
            }
            global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo> __value_ExpandedTargetTypes = ((global::Aspire.Cli.Commands.Sdk.CapabilityInfo)value).ExpandedTargetTypes;
            if (__value_ExpandedTargetTypes is not null)
            {
                writer.WritePropertyName(PropName_ExpandedTargetTypes);
                ListTypeRefInfoSerializeHandler(writer, __value_ExpandedTargetTypes);
            }
 
            writer.WriteEndObject();
        }
    }
}