|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Cli.Backchannel
{
internal partial class BackchannelJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingActivityData>? _PublishingActivityData;
/// <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::Aspire.Cli.Backchannel.PublishingActivityData> PublishingActivityData
#nullable enable annotations
{
get => _PublishingActivityData ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingActivityData>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.PublishingActivityData));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingActivityData> Create_PublishingActivityData(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.PublishingActivityData>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingActivityData> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.PublishingActivityData>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.PublishingActivityData(){ Id = (string)args[0], StatusText = (string)args[1], CompletionState = (string)args[2], StepId = (string)args[3], CompletionMessage = (string)args[4], Inputs = (global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.PublishingPromptInput>)args[5], LogLevel = (string)args[6], Timestamp = (global::System.DateTimeOffset?)args[7], EnableMarkdown = (bool)args[8] },
PropertyMetadataInitializer = _ => PublishingActivityDataPropInit(options),
ConstructorParameterMetadataInitializer = PublishingActivityDataCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = PublishingActivityDataSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Backchannel.PublishingActivityData>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] PublishingActivityDataPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[12];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).Id,
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 = "Id",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("Id", 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);
properties[0].IsRequired = true;
properties[0].IsGetNullable = false;
properties[0].IsSetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).StatusText,
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 = "StatusText",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("StatusText", 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::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).CompletionState,
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 = "CompletionState",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("CompletionState", 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].IsGetNullable = false;
properties[2].IsSetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).IsComplete,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsComplete",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("IsComplete", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).IsError,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsError",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("IsError", 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);
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).IsWarning,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsWarning",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("IsWarning", 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);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).StepId,
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 = "StepId",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("StepId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).CompletionMessage,
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 = "CompletionMessage",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("CompletionMessage", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.PublishingPromptInput>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).Inputs,
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 = "Inputs",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("Inputs", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.PublishingPromptInput>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.PublishingPromptInput>>(options, info8);
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).LogLevel,
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 = "LogLevel",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("LogLevel", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info9);
var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset?>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).Timestamp,
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 = "Timestamp",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("Timestamp", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null),
};
properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset?>(options, info10);
var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingActivityData),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingActivityData)obj).EnableMarkdown,
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 = "EnableMarkdown",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.PublishingActivityData).GetProperty("EnableMarkdown", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info11);
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 PublishingActivityDataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.PublishingActivityData? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_Id, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).Id);
writer.WriteString(PropName_StatusText, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).StatusText);
writer.WriteString(PropName_CompletionState, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).CompletionState);
writer.WriteBoolean(PropName_IsComplete, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).IsComplete);
writer.WriteBoolean(PropName_IsError, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).IsError);
writer.WriteBoolean(PropName_IsWarning, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).IsWarning);
writer.WriteString(PropName_StepId, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).StepId);
writer.WriteString(PropName_CompletionMessage, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).CompletionMessage);
writer.WritePropertyName(PropName_Inputs);
IReadOnlyListPublishingPromptInputSerializeHandler(writer, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).Inputs);
writer.WriteString(PropName_LogLevel, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).LogLevel);
writer.WritePropertyName(PropName_Timestamp);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).Timestamp, NullableDateTimeOffset);
writer.WriteBoolean(PropName_EnableMarkdown, ((global::Aspire.Cli.Backchannel.PublishingActivityData)value).EnableMarkdown);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] PublishingActivityDataCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Id",
ParameterType = typeof(string),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "StatusText",
ParameterType = typeof(string),
Position = 1,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "CompletionState",
ParameterType = typeof(string),
Position = 2,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "StepId",
ParameterType = typeof(string),
Position = 3,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "CompletionMessage",
ParameterType = typeof(string),
Position = 4,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "Inputs",
ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.PublishingPromptInput>),
Position = 5,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "LogLevel",
ParameterType = typeof(string),
Position = 6,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "Timestamp",
ParameterType = typeof(global::System.DateTimeOffset?),
Position = 7,
IsNullable = true,
IsMemberInitializer = true,
},
new()
{
Name = "EnableMarkdown",
ParameterType = typeof(bool),
Position = 8,
IsNullable = false,
IsMemberInitializer = true,
},
};
}
}
|