// <auto-generated/>

#nullable disable

using System;

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

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