File: Generated\361d1da7f942c932\OpenAIJsonContext.FunctionToolCallOutputElement.g.cs
Project: ..\..\..\src\Libraries\Microsoft.Extensions.AI.OpenAI\Microsoft.Extensions.AI.OpenAI.csproj (Microsoft.Extensions.AI.OpenAI)
// <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
{
    internal sealed partial class OpenAIJsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement>? _FunctionToolCallOutputElement;
        
        /// <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.OpenAIResponsesChatClient.FunctionToolCallOutputElement> FunctionToolCallOutputElement
        #nullable enable annotations
        {
            get => _FunctionToolCallOutputElement ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement> Create_FunctionToolCallOutputElement(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement>
                {
                    ObjectCreator = () => new global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => FunctionToolCallOutputElementPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = FunctionToolCallOutputElementSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] FunctionToolCallOutputElementPropInit(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::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).Type,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).Type = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Type",
                JsonPropertyName = "type",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("Type", 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<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).Text,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).Text = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Text",
                JsonPropertyName = "text",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("Text", 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);
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).ImageUrl,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).ImageUrl = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ImageUrl",
                JsonPropertyName = "image_url",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("ImageUrl", 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);
 
            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileId,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileId = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "FileId",
                JsonPropertyName = "file_id",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("FileId", 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);
 
            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileData,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileData = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "FileData",
                JsonPropertyName = "file_data",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("FileData", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info4);
 
            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileUrl,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileUrl = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "FileUrl",
                JsonPropertyName = "file_url",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("FileUrl", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info5);
 
            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement),
                Converter = null,
                Getter = static obj => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileName,
                Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)obj).FileName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "FileName",
                JsonPropertyName = "filename",
                AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement).GetProperty("FileName", 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);
 
            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 FunctionToolCallOutputElementSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            string __value_Type = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).Type;
            if (__value_Type is not null)
            {
                writer.WriteString(PropName_type, __value_Type);
            }
            string __value_Text = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).Text;
            if (__value_Text is not null)
            {
                writer.WriteString(PropName_text, __value_Text);
            }
            string __value_ImageUrl = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).ImageUrl;
            if (__value_ImageUrl is not null)
            {
                writer.WriteString(PropName_image_url, __value_ImageUrl);
            }
            string __value_FileId = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).FileId;
            if (__value_FileId is not null)
            {
                writer.WriteString(PropName_file_id, __value_FileId);
            }
            string __value_FileData = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).FileData;
            if (__value_FileData is not null)
            {
                writer.WriteString(PropName_file_data, __value_FileData);
            }
            string __value_FileUrl = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).FileUrl;
            if (__value_FileUrl is not null)
            {
                writer.WriteString(PropName_file_url, __value_FileUrl);
            }
            string __value_FileName = ((global::Microsoft.Extensions.AI.OpenAIResponsesChatClient.FunctionToolCallOutputElement)value).FileName;
            if (__value_FileName is not null)
            {
                writer.WriteString(PropName_filename, __value_FileName);
            }
 
            writer.WriteEndObject();
        }
    }
}