// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.Chat
{
    internal static partial class ChatToolCallKindExtensions
    {
        public static string ToSerialString(this Chat.ChatToolCallKind value) => value switch
        {
            Chat.ChatToolCallKind.Function => "function",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatToolCallKind value.")
        };

        public static Chat.ChatToolCallKind ToChatToolCallKind(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "function"))
            {
                return Chat.ChatToolCallKind.Function;
            }
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatToolCallKind value.");
        }
    }
}
