// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.Responses
{
    internal static partial class ComputerCallActionKindExtensions
    {
        public static string ToSerialString(this ComputerCallActionKind value) => value switch
        {
            ComputerCallActionKind.Screenshot => "screenshot",
            ComputerCallActionKind.Click => "click",
            ComputerCallActionKind.DoubleClick => "double_click",
            ComputerCallActionKind.Scroll => "scroll",
            ComputerCallActionKind.Type => "type",
            ComputerCallActionKind.Wait => "wait",
            ComputerCallActionKind.KeyPress => "keypress",
            ComputerCallActionKind.Drag => "drag",
            ComputerCallActionKind.Move => "move",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ComputerCallActionKind value.")
        };

        public static ComputerCallActionKind ToComputerCallActionKind(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "screenshot"))
            {
                return ComputerCallActionKind.Screenshot;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "click"))
            {
                return ComputerCallActionKind.Click;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "double_click"))
            {
                return ComputerCallActionKind.DoubleClick;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "scroll"))
            {
                return ComputerCallActionKind.Scroll;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "type"))
            {
                return ComputerCallActionKind.Type;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "wait"))
            {
                return ComputerCallActionKind.Wait;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "keypress"))
            {
                return ComputerCallActionKind.KeyPress;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "drag"))
            {
                return ComputerCallActionKind.Drag;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "move"))
            {
                return ComputerCallActionKind.Move;
            }
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ComputerCallActionKind value.");
        }
    }
}
