File: IdentityJsonSerializerContext.PublicKeyCredentialRequestOptions.g.cs
Project: src\src\Identity\Core\src\Microsoft.AspNetCore.Identity.csproj (Microsoft.AspNetCore.Identity)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Microsoft.AspNetCore.Identity
{
    internal partial class IdentityJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions>? _PublicKeyCredentialRequestOptions;
        
        /// <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::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions> PublicKeyCredentialRequestOptions
        #nullable enable annotations
        {
            get => _PublicKeyCredentialRequestOptions ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions> Create_PublicKeyCredentialRequestOptions(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions(){ Challenge = (global::Microsoft.AspNetCore.Identity.BufferSource)args[0], Timeout = (ulong?)args[1], RpId = (string)args[2], AllowCredentials = (global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialDescriptor>)args[3], UserVerification = (string)args[4], Hints = (global::System.Collections.Generic.IReadOnlyList<string>)args[5], Extensions = (global::System.Text.Json.JsonElement?)args[6] },
                    PropertyMetadataInitializer = _ => PublicKeyCredentialRequestOptionsPropInit(options),
                    ConstructorParameterMetadataInitializer = PublicKeyCredentialRequestOptionsCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = PublicKeyCredentialRequestOptionsSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] PublicKeyCredentialRequestOptionsPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[7];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Identity.BufferSource>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).Challenge,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Challenge",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("Challenge", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Identity.BufferSource), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Identity.BufferSource>(options, info0);
            properties[0].IsRequired = true;
            properties[0].IsGetNullable = false;
            properties[0].IsSetNullable = false;
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<ulong?>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).Timeout,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Timeout",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("Timeout", InstanceMemberBindingFlags, null, typeof(ulong?), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<ulong?>(options, info1);
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).RpId,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RpId",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("RpId", 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<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialDescriptor>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).AllowCredentials,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "AllowCredentials",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("AllowCredentials", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialDescriptor>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialDescriptor>>(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::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).UserVerification,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "UserVerification",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("UserVerification", 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<global::System.Collections.Generic.IReadOnlyList<string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).Hints,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Hints",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("Hints", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<string>>(options, info5);
            properties[5].IsGetNullable = false;
            properties[5].IsSetNullable = false;
 
            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Text.Json.JsonElement?>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)obj).Extensions,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Extensions",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions).GetProperty("Extensions", InstanceMemberBindingFlags, null, typeof(global::System.Text.Json.JsonElement?), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Text.Json.JsonElement?>(options, info6);
 
            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 PublicKeyCredentialRequestOptionsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            global::Microsoft.AspNetCore.Identity.BufferSource __value_Challenge = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).Challenge;
            if (__value_Challenge is not null)
            {
                writer.WritePropertyName(PropName_challenge);
                global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Challenge, BufferSource);
            }
            ulong? __value_Timeout = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).Timeout;
            if (__value_Timeout is not null)
            {
                writer.WritePropertyName(PropName_timeout);
                global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Timeout, NullableUInt64);
            }
            string __value_RpId = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).RpId;
            if (__value_RpId is not null)
            {
                writer.WriteString(PropName_rpId, __value_RpId);
            }
            global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialDescriptor> __value_AllowCredentials = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).AllowCredentials;
            if (__value_AllowCredentials is not null)
            {
                writer.WritePropertyName(PropName_allowCredentials);
                IReadOnlyListPublicKeyCredentialDescriptorSerializeHandler(writer, __value_AllowCredentials);
            }
            string __value_UserVerification = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).UserVerification;
            if (__value_UserVerification is not null)
            {
                writer.WriteString(PropName_userVerification, __value_UserVerification);
            }
            global::System.Collections.Generic.IReadOnlyList<string> __value_Hints = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).Hints;
            if (__value_Hints is not null)
            {
                writer.WritePropertyName(PropName_hints);
                IReadOnlyListStringSerializeHandler(writer, __value_Hints);
            }
            global::System.Text.Json.JsonElement? __value_Extensions = ((global::Microsoft.AspNetCore.Identity.PublicKeyCredentialRequestOptions)value).Extensions;
            if (__value_Extensions is not null)
            {
                writer.WritePropertyName(PropName_extensions);
                global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Extensions, NullableJsonElement);
            }
 
            writer.WriteEndObject();
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] PublicKeyCredentialRequestOptionsCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "Challenge",
                ParameterType = typeof(global::Microsoft.AspNetCore.Identity.BufferSource),
                Position = 0,
                IsNullable = false,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "Timeout",
                ParameterType = typeof(ulong?),
                Position = 1,
                IsNullable = true,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "RpId",
                ParameterType = typeof(string),
                Position = 2,
                IsNullable = true,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "AllowCredentials",
                ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Identity.PublicKeyCredentialDescriptor>),
                Position = 3,
                IsNullable = false,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "UserVerification",
                ParameterType = typeof(string),
                Position = 4,
                IsNullable = true,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "Hints",
                ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<string>),
                Position = 5,
                IsNullable = false,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "Extensions",
                ParameterType = typeof(global::System.Text.Json.JsonElement?),
                Position = 6,
                IsNullable = true,
                IsMemberInitializer = true,
            },
        };
    }
}