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

from typing import TYPE_CHECKING
from importlib import import_module
import builtins

if TYPE_CHECKING:
    from .badrequesterrorresponse import (
        BadRequestErrorResponse,
        BadRequestErrorResponseData,
    )
    from .forbiddenerrorresponse import (
        ForbiddenErrorResponse,
        ForbiddenErrorResponseData,
    )
    from .internalservererrorresponse import (
        InternalServerErrorResponse,
        InternalServerErrorResponseData,
    )
    from .no_response_error import NoResponseError
    from .notfounderrorresponse import NotFoundErrorResponse, NotFoundErrorResponseData
    from .payloadtoolargeerrorresponse import (
        PayloadTooLargeErrorResponse,
        PayloadTooLargeErrorResponseData,
    )
    from .paymentrequirederrorresponse import (
        PaymentRequiredErrorResponse,
        PaymentRequiredErrorResponseData,
    )
    from .requesttimeouterrorresponse import (
        RequestTimeoutErrorResponse,
        RequestTimeoutErrorResponseData,
    )
    from .responsevalidationerror import ResponseValidationError
    from .supertonedefaulterror import SupertoneDefaultError
    from .supertoneerror import SupertoneError
    from .toomanyrequestserrorresponse import (
        TooManyRequestsErrorResponse,
        TooManyRequestsErrorResponseData,
    )
    from .unauthorizederrorresponse import (
        UnauthorizedErrorResponse,
        UnauthorizedErrorResponseData,
    )
    from .unsupportedmediatypeerrorresponse import (
        UnsupportedMediaTypeErrorResponse,
        UnsupportedMediaTypeErrorResponseData,
    )

__all__ = [
    "BadRequestErrorResponse",
    "BadRequestErrorResponseData",
    "ForbiddenErrorResponse",
    "ForbiddenErrorResponseData",
    "InternalServerErrorResponse",
    "InternalServerErrorResponseData",
    "NoResponseError",
    "NotFoundErrorResponse",
    "NotFoundErrorResponseData",
    "PayloadTooLargeErrorResponse",
    "PayloadTooLargeErrorResponseData",
    "PaymentRequiredErrorResponse",
    "PaymentRequiredErrorResponseData",
    "RequestTimeoutErrorResponse",
    "RequestTimeoutErrorResponseData",
    "ResponseValidationError",
    "SupertoneDefaultError",
    "SupertoneError",
    "TooManyRequestsErrorResponse",
    "TooManyRequestsErrorResponseData",
    "UnauthorizedErrorResponse",
    "UnauthorizedErrorResponseData",
    "UnsupportedMediaTypeErrorResponse",
    "UnsupportedMediaTypeErrorResponseData",
]

_dynamic_imports: dict[str, str] = {
    "BadRequestErrorResponse": ".badrequesterrorresponse",
    "BadRequestErrorResponseData": ".badrequesterrorresponse",
    "ForbiddenErrorResponse": ".forbiddenerrorresponse",
    "ForbiddenErrorResponseData": ".forbiddenerrorresponse",
    "InternalServerErrorResponse": ".internalservererrorresponse",
    "InternalServerErrorResponseData": ".internalservererrorresponse",
    "NoResponseError": ".no_response_error",
    "NotFoundErrorResponse": ".notfounderrorresponse",
    "NotFoundErrorResponseData": ".notfounderrorresponse",
    "PayloadTooLargeErrorResponse": ".payloadtoolargeerrorresponse",
    "PayloadTooLargeErrorResponseData": ".payloadtoolargeerrorresponse",
    "PaymentRequiredErrorResponse": ".paymentrequirederrorresponse",
    "PaymentRequiredErrorResponseData": ".paymentrequirederrorresponse",
    "RequestTimeoutErrorResponse": ".requesttimeouterrorresponse",
    "RequestTimeoutErrorResponseData": ".requesttimeouterrorresponse",
    "ResponseValidationError": ".responsevalidationerror",
    "SupertoneDefaultError": ".supertonedefaulterror",
    "SupertoneError": ".supertoneerror",
    "TooManyRequestsErrorResponse": ".toomanyrequestserrorresponse",
    "TooManyRequestsErrorResponseData": ".toomanyrequestserrorresponse",
    "UnauthorizedErrorResponse": ".unauthorizederrorresponse",
    "UnauthorizedErrorResponseData": ".unauthorizederrorresponse",
    "UnsupportedMediaTypeErrorResponse": ".unsupportedmediatypeerrorresponse",
    "UnsupportedMediaTypeErrorResponseData": ".unsupportedmediatypeerrorresponse",
}


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 = builtins.list(_dynamic_imports.keys())
    return builtins.sorted(lazy_attrs)
