// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.Responses
{
    internal static partial class FunctionCallOutputStatusExtensions
    {
        public static string ToSerialString(this FunctionCallOutputStatus value) => value switch
        {
            FunctionCallOutputStatus.InProgress => "in_progress",
            FunctionCallOutputStatus.Completed => "completed",
            FunctionCallOutputStatus.Incomplete => "incomplete",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FunctionCallOutputStatus value.")
        };

        public static FunctionCallOutputStatus ToFunctionCallOutputStatus(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "in_progress"))
            {
                return FunctionCallOutputStatus.InProgress;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "completed"))
            {
                return FunctionCallOutputStatus.Completed;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "incomplete"))
            {
                return FunctionCallOutputStatus.Incomplete;
            }
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FunctionCallOutputStatus value.");
        }
    }
}
