// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.Assistants
{
    internal static partial class RunStepKindExtensions
    {
        public static string ToSerialString(this RunStepKind value) => value switch
        {
            RunStepKind.CreatedMessage => "message_creation",
            RunStepKind.ToolCall => "tool_calls",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RunStepKind value.")
        };

        public static RunStepKind ToRunStepKind(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "message_creation"))
            {
                return RunStepKind.CreatedMessage;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "tool_calls"))
            {
                return RunStepKind.ToolCall;
            }
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RunStepKind value.");
        }
    }
}
