|
// <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 GenAIEventsContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction>? _ToolCallFunction;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction> ToolCallFunction
{
get => _ToolCallFunction ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction>)Options.GetTypeInfo(typeof(global::Aspire.Dashboard.Model.GenAI.ToolCallFunction));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction> Create_ToolCallFunction(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction>
{
ObjectCreator = () => new global::Aspire.Dashboard.Model.GenAI.ToolCallFunction(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => ToolCallFunctionPropInit(options),
ConstructorParameterMetadataInitializer = null,
SerializeHandler = ToolCallFunctionSerializeHandler
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Dashboard.Model.GenAI.ToolCallFunction>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ToolCallFunctionPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[2];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Dashboard.Model.GenAI.ToolCallFunction),
Converter = null,
Getter = static obj => ((global::Aspire.Dashboard.Model.GenAI.ToolCallFunction)obj).Name,
Setter = static (obj, value) => ((global::Aspire.Dashboard.Model.GenAI.ToolCallFunction)obj).Name = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Name",
JsonPropertyName = 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.Text.Json.Nodes.JsonNode>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Dashboard.Model.GenAI.ToolCallFunction),
Converter = null,
Getter = static obj => ((global::Aspire.Dashboard.Model.GenAI.ToolCallFunction)obj).Arguments,
Setter = static (obj, value) => ((global::Aspire.Dashboard.Model.GenAI.ToolCallFunction)obj).Arguments = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Arguments",
JsonPropertyName = null
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Text.Json.Nodes.JsonNode>(options, info1);
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 ToolCallFunctionSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Dashboard.Model.GenAI.ToolCallFunction? value)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Name = ((global::Aspire.Dashboard.Model.GenAI.ToolCallFunction)value).Name;
if (__value_Name != null)
{
writer.WriteString(PropName_name, __value_Name);
}
global::System.Text.Json.Nodes.JsonNode __value_Arguments = ((global::Aspire.Dashboard.Model.GenAI.ToolCallFunction)value).Arguments;
if (__value_Arguments != null)
{
writer.WritePropertyName(PropName_arguments);
global::System.Text.Json.JsonSerializer.Serialize(writer, __value_Arguments, JsonNode);
}
writer.WriteEndObject();
}
}
}
|