# This file was generated by liblab | https://liblab.com/
from __future__ import annotations
from .base import BaseModel
from enum import Enum
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from .OpenAiFunction import OpenAiFunction


class Type_(Enum):
    """Function _Type"""
    FUNCTION = "function"

    @classmethod
    def list(cls):
        """Return the list of Items"""
        return [member.value for member in cls]


class OpenAiToolCall(BaseModel):
    """
    Represents a tool call for OpenAI.
    """

    def __init__(self, type: Type_, function: OpenAiFunction, id: str, **kwargs):
        """
        Initialize OpenAiToolCall
        Parameters:
        ----------
            type: str
            function: OpenAiFunction
            id: str
        """
        self.type = self._enum_matching(type, Type_.list(), "type")
        self.function = function
        self.id = id
    