|
// <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.PublishingPromptInput>? _PublishingPromptInput;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingPromptInput> PublishingPromptInput
{
get => _PublishingPromptInput ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingPromptInput>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.PublishingPromptInput));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingPromptInput> Create_PublishingPromptInput(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.PublishingPromptInput>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.PublishingPromptInput> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.PublishingPromptInput>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.PublishingPromptInput(){ Label = (string)args[0], InputType = (string)args[1], Required = (bool)args[2], Options = (global::System.Collections.Generic.IReadOnlyList<global::System.Collections.Generic.KeyValuePair<string, string>>)args[3], Value = (string)args[4], ValidationErrors = (global::System.Collections.Generic.IReadOnlyList<string>)args[5], AllowCustomChoice = (bool)args[6] },
PropertyMetadataInitializer = _ => PublishingPromptInputPropInit(options),
ConstructorParameterMetadataInitializer = PublishingPromptInputCtorParamInit,
SerializeHandler = PublishingPromptInputSerializeHandler
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Backchannel.PublishingPromptInput>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] PublishingPromptInputPropInit(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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).Label,
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 = "Label",
JsonPropertyName = null
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(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::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).InputType,
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 = "InputType",
JsonPropertyName = null
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1);
properties[1].IsRequired = true;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).Required,
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 = "Required",
JsonPropertyName = null
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::System.Collections.Generic.KeyValuePair<string, string>>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).Options,
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 = "Options",
JsonPropertyName = null
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::System.Collections.Generic.KeyValuePair<string, string>>>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).Value,
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 = "Value",
JsonPropertyName = 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::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).ValidationErrors,
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 = "ValidationErrors",
JsonPropertyName = null
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<string>>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.PublishingPromptInput),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.PublishingPromptInput)obj).AllowCustomChoice,
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 = "AllowCustomChoice",
JsonPropertyName = null
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(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 PublishingPromptInputSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.PublishingPromptInput? value)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_Label, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).Label);
writer.WriteString(PropName_InputType, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).InputType);
writer.WriteBoolean(PropName_Required, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).Required);
writer.WritePropertyName(PropName_Options);
IReadOnlyListKeyValuePairStringStringSerializeHandler(writer, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).Options);
writer.WriteString(PropName_Value, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).Value);
writer.WritePropertyName(PropName_ValidationErrors);
IReadOnlyListStringSerializeHandler(writer, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).ValidationErrors);
writer.WriteBoolean(PropName_AllowCustomChoice, ((global::Aspire.Cli.Backchannel.PublishingPromptInput)value).AllowCustomChoice);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] PublishingPromptInputCtorParamInit()
{
var parameters = new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[7];
parameters[0] = new()
{
Name = "Label",
ParameterType = typeof(string),
Position = 0,
};
parameters[1] = new()
{
Name = "InputType",
ParameterType = typeof(string),
Position = 1,
};
parameters[2] = new()
{
Name = "Required",
ParameterType = typeof(bool),
Position = 2,
};
parameters[3] = new()
{
Name = "Options",
ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::System.Collections.Generic.KeyValuePair<string, string>>),
Position = 3,
};
parameters[4] = new()
{
Name = "Value",
ParameterType = typeof(string),
Position = 4,
};
parameters[5] = new()
{
Name = "ValidationErrors",
ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<string>),
Position = 5,
};
parameters[6] = new()
{
Name = "AllowCustomChoice",
ParameterType = typeof(bool),
Position = 6,
};
return parameters;
}
}
}
|