// <auto-generated/>

#nullable disable

using System;

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

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