// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.Extensions.AI.Evaluation.Quality.JsonSerialization
{
internal sealed partial class SerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating>? _IntentResolutionRating;
/// <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.Extensions.AI.Evaluation.Quality.IntentResolutionRating> IntentResolutionRating
#nullable enable annotations
{
get => _IntentResolutionRating ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating> Create_IntentResolutionRating(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating((int)args[0], (string)args[1], (string)args[2], (string)args[3], (bool)args[4], (bool)args[5], (bool)args[6]),
PropertyMetadataInitializer = _ => IntentResolutionRatingPropInit(options),
ConstructorParameterMetadataInitializer = IntentResolutionRatingCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(int), typeof(string), typeof(string), typeof(string), typeof(bool), typeof(bool), typeof(bool)}, modifiers: null),
SerializeHandler = IntentResolutionRatingSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] IntentResolutionRatingPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[8];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).ResolutionScore,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).ResolutionScore = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ResolutionScore",
JsonPropertyName = "resolution_score",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("ResolutionScore", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info0);
properties[0].IsRequired = true;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).Explanation,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).Explanation = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Explanation",
JsonPropertyName = "explanation",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("Explanation", 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].IsRequired = true;
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::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).AgentPerceivedIntent,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).AgentPerceivedIntent = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AgentPerceivedIntent",
JsonPropertyName = "agent_perceived_intent",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("AgentPerceivedIntent", 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);
properties[2].IsRequired = true;
properties[2].IsGetNullable = false;
properties[2].IsSetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).ActualUserIntent,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).ActualUserIntent = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ActualUserIntent",
JsonPropertyName = "actual_user_intent",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("ActualUserIntent", 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].IsRequired = true;
properties[3].IsGetNullable = false;
properties[3].IsSetNullable = false;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).ConversationHasIntent,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).ConversationHasIntent = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ConversationHasIntent",
JsonPropertyName = "conversation_has_intent",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("ConversationHasIntent", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info4);
properties[4].IsRequired = true;
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).CorrectIntentDetected,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).CorrectIntentDetected = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "CorrectIntentDetected",
JsonPropertyName = "correct_intent_detected",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("CorrectIntentDetected", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info5);
properties[5].IsRequired = true;
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).IntentResolved,
Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).IntentResolved = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IntentResolved",
JsonPropertyName = "intent_resolved",
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("IntentResolved", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info6);
properties[6].IsRequired = true;
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating),
Converter = null,
Getter = static obj => ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)obj).IsInconclusive,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsInconclusive",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating).GetProperty("IsInconclusive", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info7);
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 IntentResolutionRatingSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteNumber(PropName_resolution_score, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).ResolutionScore);
writer.WriteString(PropName_explanation, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).Explanation);
writer.WriteString(PropName_agent_perceived_intent, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).AgentPerceivedIntent);
writer.WriteString(PropName_actual_user_intent, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).ActualUserIntent);
writer.WriteBoolean(PropName_conversation_has_intent, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).ConversationHasIntent);
writer.WriteBoolean(PropName_correct_intent_detected, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).CorrectIntentDetected);
writer.WriteBoolean(PropName_intent_resolved, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).IntentResolved);
writer.WriteBoolean(PropName_isInconclusive, ((global::Microsoft.Extensions.AI.Evaluation.Quality.IntentResolutionRating)value).IsInconclusive);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] IntentResolutionRatingCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "resolutionScore",
ParameterType = typeof(int),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "explanation",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "agentPerceivedIntent",
ParameterType = typeof(string),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "actualUserIntent",
ParameterType = typeof(string),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "conversationHasIntent",
ParameterType = typeof(bool),
Position = 4,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "correctIntentDetected",
ParameterType = typeof(bool),
Position = 5,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "intentResolved",
ParameterType = typeof(bool),
Position = 6,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
};
}
}