"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from typing import TYPE_CHECKING
from importlib import import_module

if TYPE_CHECKING:
    from .badrequest import BadRequest, BadRequestData, Code, Error, ErrorTypedDict
    from .conflict import (
        Conflict,
        ConflictCode,
        ConflictData,
        ConflictError,
        ConflictErrorTypedDict,
    )
    from .forbidden import (
        Forbidden,
        ForbiddenCode,
        ForbiddenData,
        ForbiddenError,
        ForbiddenErrorTypedDict,
    )
    from .internalservererror import (
        InternalServerError,
        InternalServerErrorCode,
        InternalServerErrorData,
        InternalServerErrorError,
        InternalServerErrorErrorTypedDict,
    )
    from .inviteexpired import (
        InviteExpired,
        InviteExpiredCode,
        InviteExpiredData,
        InviteExpiredError,
        InviteExpiredErrorTypedDict,
    )
    from .notfound import (
        NotFound,
        NotFoundCode,
        NotFoundData,
        NotFoundError,
        NotFoundErrorTypedDict,
    )
    from .ratelimitexceeded import (
        RateLimitExceeded,
        RateLimitExceededCode,
        RateLimitExceededData,
        RateLimitExceededError,
        RateLimitExceededErrorTypedDict,
    )
    from .sdkerror import SDKError
    from .unauthorized import (
        Unauthorized,
        UnauthorizedCode,
        UnauthorizedData,
        UnauthorizedError,
        UnauthorizedErrorTypedDict,
    )
    from .unprocessableentity import (
        UnprocessableEntity,
        UnprocessableEntityCode,
        UnprocessableEntityData,
        UnprocessableEntityError,
        UnprocessableEntityErrorTypedDict,
    )

__all__ = [
    "BadRequest",
    "BadRequestData",
    "Code",
    "Conflict",
    "ConflictCode",
    "ConflictData",
    "ConflictError",
    "ConflictErrorTypedDict",
    "Error",
    "ErrorTypedDict",
    "Forbidden",
    "ForbiddenCode",
    "ForbiddenData",
    "ForbiddenError",
    "ForbiddenErrorTypedDict",
    "InternalServerError",
    "InternalServerErrorCode",
    "InternalServerErrorData",
    "InternalServerErrorError",
    "InternalServerErrorErrorTypedDict",
    "InviteExpired",
    "InviteExpiredCode",
    "InviteExpiredData",
    "InviteExpiredError",
    "InviteExpiredErrorTypedDict",
    "NotFound",
    "NotFoundCode",
    "NotFoundData",
    "NotFoundError",
    "NotFoundErrorTypedDict",
    "RateLimitExceeded",
    "RateLimitExceededCode",
    "RateLimitExceededData",
    "RateLimitExceededError",
    "RateLimitExceededErrorTypedDict",
    "SDKError",
    "Unauthorized",
    "UnauthorizedCode",
    "UnauthorizedData",
    "UnauthorizedError",
    "UnauthorizedErrorTypedDict",
    "UnprocessableEntity",
    "UnprocessableEntityCode",
    "UnprocessableEntityData",
    "UnprocessableEntityError",
    "UnprocessableEntityErrorTypedDict",
]

_dynamic_imports: dict[str, str] = {
    "BadRequest": ".badrequest",
    "BadRequestData": ".badrequest",
    "Code": ".badrequest",
    "Error": ".badrequest",
    "ErrorTypedDict": ".badrequest",
    "Conflict": ".conflict",
    "ConflictCode": ".conflict",
    "ConflictData": ".conflict",
    "ConflictError": ".conflict",
    "ConflictErrorTypedDict": ".conflict",
    "Forbidden": ".forbidden",
    "ForbiddenCode": ".forbidden",
    "ForbiddenData": ".forbidden",
    "ForbiddenError": ".forbidden",
    "ForbiddenErrorTypedDict": ".forbidden",
    "InternalServerError": ".internalservererror",
    "InternalServerErrorCode": ".internalservererror",
    "InternalServerErrorData": ".internalservererror",
    "InternalServerErrorError": ".internalservererror",
    "InternalServerErrorErrorTypedDict": ".internalservererror",
    "InviteExpired": ".inviteexpired",
    "InviteExpiredCode": ".inviteexpired",
    "InviteExpiredData": ".inviteexpired",
    "InviteExpiredError": ".inviteexpired",
    "InviteExpiredErrorTypedDict": ".inviteexpired",
    "NotFound": ".notfound",
    "NotFoundCode": ".notfound",
    "NotFoundData": ".notfound",
    "NotFoundError": ".notfound",
    "NotFoundErrorTypedDict": ".notfound",
    "RateLimitExceeded": ".ratelimitexceeded",
    "RateLimitExceededCode": ".ratelimitexceeded",
    "RateLimitExceededData": ".ratelimitexceeded",
    "RateLimitExceededError": ".ratelimitexceeded",
    "RateLimitExceededErrorTypedDict": ".ratelimitexceeded",
    "SDKError": ".sdkerror",
    "Unauthorized": ".unauthorized",
    "UnauthorizedCode": ".unauthorized",
    "UnauthorizedData": ".unauthorized",
    "UnauthorizedError": ".unauthorized",
    "UnauthorizedErrorTypedDict": ".unauthorized",
    "UnprocessableEntity": ".unprocessableentity",
    "UnprocessableEntityCode": ".unprocessableentity",
    "UnprocessableEntityData": ".unprocessableentity",
    "UnprocessableEntityError": ".unprocessableentity",
    "UnprocessableEntityErrorTypedDict": ".unprocessableentity",
}


def __getattr__(attr_name: str) -> object:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(
            f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
        )

    try:
        module = import_module(module_name, __package__)
        result = getattr(module, attr_name)
        return result
    except ImportError as e:
        raise ImportError(
            f"Failed to import {attr_name} from {module_name}: {e}"
        ) from e
    except AttributeError as e:
        raise AttributeError(
            f"Failed to get {attr_name} from {module_name}: {e}"
        ) from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)
