// <auto-generated/>

#nullable disable

using System;

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

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