// <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 { public static partial class AIJsonUtilities { private sealed partial class JsonContext { private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.HostedFileClientMetadata>? _HostedFileClientMetadata; /// <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.HostedFileClientMetadata> HostedFileClientMetadata #nullable enable annotations { get => _HostedFileClientMetadata ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.HostedFileClientMetadata>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.HostedFileClientMetadata)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.HostedFileClientMetadata> Create_HostedFileClientMetadata(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.HostedFileClientMetadata>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.HostedFileClientMetadata> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.HostedFileClientMetadata> { ObjectCreator = null, ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileClientMetadata((string)args[0], (global::System.Uri)args[1]), PropertyMetadataInitializer = _ => HostedFileClientMetadataPropInit(options), ConstructorParameterMetadataInitializer = HostedFileClientMetadataCtorParamInit, ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.HostedFileClientMetadata).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(global::System.Uri)}, modifiers: null), SerializeHandler = HostedFileClientMetadataSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.HostedFileClientMetadata>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] HostedFileClientMetadataPropInit(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::Microsoft.Extensions.AI.HostedFileClientMetadata), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.HostedFileClientMetadata)obj).ProviderName, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ProviderName", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.HostedFileClientMetadata).GetProperty("ProviderName", 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); var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::Microsoft.Extensions.AI.HostedFileClientMetadata), Converter = null, Getter = static obj => ((global::Microsoft.Extensions.AI.HostedFileClientMetadata)obj).ProviderUri, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "ProviderUri", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.HostedFileClientMetadata).GetProperty("ProviderUri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), }; properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(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 HostedFileClientMetadataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.HostedFileClientMetadata? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); string __value_ProviderName = ((global::Microsoft.Extensions.AI.HostedFileClientMetadata)value).ProviderName; if (__value_ProviderName is not null) { writer.WriteString(PropName_providerName, __value_ProviderName); } global::System.Uri __value_ProviderUri = ((global::Microsoft.Extensions.AI.HostedFileClientMetadata)value).ProviderUri; if (__value_ProviderUri is not null) { writer.WritePropertyName(PropName_providerUri); global::System.Text.Json.JsonSerializer.Serialize(writer, __value_ProviderUri, Uri); } writer.WriteEndObject(); } private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] HostedFileClientMetadataCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] { new() { Name = "providerName", ParameterType = typeof(string), Position = 0, HasDefaultValue = true, DefaultValue = default(string), IsNullable = true, }, new() { Name = "providerUri", ParameterType = typeof(global::System.Uri), Position = 1, HasDefaultValue = true, DefaultValue = default(global::System.Uri), IsNullable = true, }, }; } } }