File: GenAIMessagesContext.GetJsonTypeInfo.g.cs
Project: src\src\Aspire.Dashboard\Aspire.Dashboard.csproj (Aspire.Dashboard)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Aspire.Dashboard.Model.GenAI
{
    public sealed partial class GenAIMessagesContext : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver
    {
        /// <inheritdoc/>
        public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type)
        {
            Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo);
            return typeInfo;
        }
 
        global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
        {
            if (type == typeof(global::Aspire.Dashboard.Model.GenAI.ChatMessage))
            {
                return Create_ChatMessage(options);
            }
            if (type == typeof(global::Aspire.Dashboard.Model.GenAI.GenericPart))
            {
                return Create_GenericPart(options);
            }
            if (type == typeof(global::Aspire.Dashboard.Model.GenAI.MessagePart))
            {
                return Create_MessagePart(options);
            }
            if (type == typeof(global::Aspire.Dashboard.Model.GenAI.TextPart))
            {
                return Create_TextPart(options);
            }
            if (type == typeof(global::Aspire.Dashboard.Model.GenAI.ToolCallRequestPart))
            {
                return Create_ToolCallRequestPart(options);
            }
            if (type == typeof(global::Aspire.Dashboard.Model.GenAI.ToolCallResponsePart))
            {
                return Create_ToolCallResponsePart(options);
            }
            if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>))
            {
                return Create_DictionaryStringJsonElement(options);
            }
            if (type == typeof(global::System.Collections.Generic.List<global::Aspire.Dashboard.Model.GenAI.ChatMessage>))
            {
                return Create_ListChatMessage(options);
            }
            if (type == typeof(global::System.Collections.Generic.List<global::Aspire.Dashboard.Model.GenAI.MessagePart>))
            {
                return Create_ListMessagePart(options);
            }
            if (type == typeof(global::System.Text.Json.JsonElement))
            {
                return Create_JsonElement(options);
            }
            if (type == typeof(global::System.Text.Json.Nodes.JsonNode))
            {
                return Create_JsonNode(options);
            }
            if (type == typeof(string))
            {
                return Create_String(options);
            }
            return null;
        }
    }
}