# -*- coding: utf-8 -*-
# code generated by Prisma. DO NOT EDIT.
# pyright: reportUnusedImport=false
# fmt: off

# global imports for type checking
from builtins import bool as _bool
from builtins import int as _int
from builtins import float as _float
from builtins import str as _str
import sys
import decimal
import datetime
from typing import (
    TYPE_CHECKING,
    Optional,
    Iterable,
    Iterator,
    Sequence,
    Callable,
    ClassVar,
    NoReturn,
    TypeVar,
    Generic,
    Mapping,
    Tuple,
    Union,
    List,
    Dict,
    Type,
    Any,
    Set,
    overload,
    cast,
)
from typing_extensions import TypedDict, Literal


LiteralString = str
# -- template models.py.jinja --
from pydantic import BaseModel

from . import fields, actions
from ._types import FuncType
from .builder import serialize_base64
from ._compat import PYDANTIC_V2, ConfigDict

if TYPE_CHECKING:
    from .client import Prisma


_PrismaModelT = TypeVar('_PrismaModelT', bound='_PrismaModel')


class _PrismaModel(BaseModel):
    if PYDANTIC_V2:
        model_config: ClassVar[ConfigDict] = ConfigDict(
            use_enum_values=True,
            arbitrary_types_allowed=True,
            populate_by_name=True,
        )
    elif not TYPE_CHECKING:
        from ._compat import BaseConfig

        class Config(BaseConfig):
            use_enum_values: bool = True
            arbitrary_types_allowed: bool = True
            allow_population_by_field_name: bool = True
            json_encoders: Dict[Any, FuncType] = {
                fields.Base64: serialize_base64,
            }

    # TODO: ensure this is required by subclasses
    __prisma_model__: ClassVar[str]


class BaseLiteLLM_BudgetTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_BudgetTable']] = 'LiteLLM_BudgetTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_BudgetTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_BudgetTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_CredentialsTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_CredentialsTable']] = 'LiteLLM_CredentialsTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_CredentialsTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_CredentialsTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ProxyModelTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ProxyModelTable']] = 'LiteLLM_ProxyModelTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ProxyModelTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ProxyModelTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_OrganizationTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_OrganizationTable']] = 'LiteLLM_OrganizationTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_OrganizationTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_OrganizationTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ModelTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ModelTable']] = 'LiteLLM_ModelTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ModelTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ModelTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_TeamTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_TeamTable']] = 'LiteLLM_TeamTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_TeamTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_TeamTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_UserTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_UserTable']] = 'LiteLLM_UserTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_UserTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_UserTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ObjectPermissionTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ObjectPermissionTable']] = 'LiteLLM_ObjectPermissionTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ObjectPermissionTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ObjectPermissionTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_MCPServerTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_MCPServerTable']] = 'LiteLLM_MCPServerTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_MCPServerTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_MCPServerTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_VerificationToken(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_VerificationToken']] = 'LiteLLM_VerificationToken'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_VerificationTokenActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_VerificationTokenActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_EndUserTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_EndUserTable']] = 'LiteLLM_EndUserTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_EndUserTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_EndUserTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_Config(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_Config']] = 'LiteLLM_Config'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ConfigActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ConfigActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_SpendLogs(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_SpendLogs']] = 'LiteLLM_SpendLogs'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_SpendLogsActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_SpendLogsActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ErrorLogs(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ErrorLogs']] = 'LiteLLM_ErrorLogs'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ErrorLogsActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ErrorLogsActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_UserNotifications(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_UserNotifications']] = 'LiteLLM_UserNotifications'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_UserNotificationsActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_UserNotificationsActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_TeamMembership(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_TeamMembership']] = 'LiteLLM_TeamMembership'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_TeamMembershipActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_TeamMembershipActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_OrganizationMembership(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_OrganizationMembership']] = 'LiteLLM_OrganizationMembership'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_OrganizationMembershipActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_OrganizationMembershipActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_InvitationLink(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_InvitationLink']] = 'LiteLLM_InvitationLink'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_InvitationLinkActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_InvitationLinkActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_AuditLog(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_AuditLog']] = 'LiteLLM_AuditLog'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_AuditLogActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_AuditLogActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_DailyUserSpend(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_DailyUserSpend']] = 'LiteLLM_DailyUserSpend'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_DailyUserSpendActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_DailyUserSpendActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_DailyTeamSpend(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_DailyTeamSpend']] = 'LiteLLM_DailyTeamSpend'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_DailyTeamSpendActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_DailyTeamSpendActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_DailyTagSpend(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_DailyTagSpend']] = 'LiteLLM_DailyTagSpend'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_DailyTagSpendActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_DailyTagSpendActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_CronJob(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_CronJob']] = 'LiteLLM_CronJob'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_CronJobActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_CronJobActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ManagedFileTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ManagedFileTable']] = 'LiteLLM_ManagedFileTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ManagedFileTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ManagedFileTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ManagedObjectTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ManagedObjectTable']] = 'LiteLLM_ManagedObjectTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ManagedObjectTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ManagedObjectTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_ManagedVectorStoresTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_ManagedVectorStoresTable']] = 'LiteLLM_ManagedVectorStoresTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_ManagedVectorStoresTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_ManagedVectorStoresTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_GuardrailsTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_GuardrailsTable']] = 'LiteLLM_GuardrailsTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_GuardrailsTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_GuardrailsTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_PromptTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_PromptTable']] = 'LiteLLM_PromptTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_PromptTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_PromptTableActions[_PrismaModelT](client or get_client(), cls)


class BaseLiteLLM_HealthCheckTable(_PrismaModel):
    __prisma_model__: ClassVar[Literal['LiteLLM_HealthCheckTable']] = 'LiteLLM_HealthCheckTable'

    @classmethod
    def prisma(cls: Type[_PrismaModelT], client: Optional['Prisma'] = None) -> 'actions.LiteLLM_HealthCheckTableActions[_PrismaModelT]':
        from .client import get_client

        return actions.LiteLLM_HealthCheckTableActions[_PrismaModelT](client or get_client(), cls)


