File: _generated\114\JsonContext.PackageDeprecationMetadata.g.cs
Web Access
Project: src\nuget-client\src\NuGet.Core\NuGet.Protocol\NuGet.Protocol.csproj (NuGet.Protocol)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618

namespace NuGet.Protocol.Utility
{
    internal partial class JsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.PackageDeprecationMetadata>? _PackageDeprecationMetadata;
        
        /// <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::NuGet.Protocol.PackageDeprecationMetadata> PackageDeprecationMetadata
        #nullable enable annotations
        {
            get => _PackageDeprecationMetadata ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.PackageDeprecationMetadata>)Options.GetTypeInfo(typeof(global::NuGet.Protocol.PackageDeprecationMetadata));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.PackageDeprecationMetadata> Create_PackageDeprecationMetadata(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Protocol.PackageDeprecationMetadata>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.PackageDeprecationMetadata> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Protocol.PackageDeprecationMetadata>
                {
                    ObjectCreator = () => new global::NuGet.Protocol.PackageDeprecationMetadata(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => PackageDeprecationMetadataPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageDeprecationMetadata).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = null,
                    PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
                    TypeClassifierFactory = null,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Protocol.PackageDeprecationMetadata>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] PackageDeprecationMetadataPropInit(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<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::NuGet.Protocol.PackageDeprecationMetadata),
                Converter = null,
                Getter = static obj => ((global::NuGet.Protocol.PackageDeprecationMetadata)obj).Message,
                Setter = static (obj, value) => ((global::NuGet.Protocol.PackageDeprecationMetadata)obj).Message = value!,
                IgnoreCondition = null,
                HasJsonInclude = true,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Message",
                JsonPropertyName = "message",
                AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageDeprecationMetadata).GetProperty("Message", 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);

            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IEnumerable<string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::NuGet.Protocol.PackageDeprecationMetadata),
                Converter = null,
                Getter = static obj => ((global::NuGet.Protocol.PackageDeprecationMetadata)obj).Reasons,
                Setter = static (obj, value) => ((global::NuGet.Protocol.PackageDeprecationMetadata)obj).Reasons = value!,
                IgnoreCondition = null,
                HasJsonInclude = true,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Reasons",
                JsonPropertyName = "reasons",
                AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageDeprecationMetadata).GetProperty("Reasons", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IEnumerable<string>>(options, info1);
            properties[1].IsGetNullable = false;
            properties[1].IsSetNullable = false;

            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Protocol.AlternatePackageMetadata>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::NuGet.Protocol.PackageDeprecationMetadata),
                Converter = null,
                Getter = static obj => ((global::NuGet.Protocol.PackageDeprecationMetadata)obj).AlternatePackage,
                Setter = static (obj, value) => ((global::NuGet.Protocol.PackageDeprecationMetadata)obj).AlternatePackage = value!,
                IgnoreCondition = null,
                HasJsonInclude = true,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "AlternatePackage",
                JsonPropertyName = "alternatePackage",
                AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageDeprecationMetadata).GetProperty("AlternatePackage", InstanceMemberBindingFlags, null, typeof(global::NuGet.Protocol.AlternatePackageMetadata), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Protocol.AlternatePackageMetadata>(options, info2);

            return properties;
        }
    }
}