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

from typing import TYPE_CHECKING
from importlib import import_module

if TYPE_CHECKING:
    from .apierror import APIError
    from .error import Error, ErrorData
    from .getpassageaudioop import (
        GetPassageAudioRequest,
        GetPassageAudioRequestTypedDict,
    )
    from .getpassagehtmlop import GetPassageHTMLRequest, GetPassageHTMLRequestTypedDict
    from .getpassagetextop import (
        GetPassageTextRequest,
        GetPassageTextRequestTypedDict,
        IndentUsing,
    )
    from .passagemeta import PassageMeta, PassageMetaTypedDict
    from .passageresponse import PassageResponse, PassageResponseTypedDict
    from .searchpassagesop import (
        Results,
        ResultsTypedDict,
        SearchPassagesRequest,
        SearchPassagesRequestTypedDict,
        SearchPassagesResponse,
        SearchPassagesResponseBody,
        SearchPassagesResponseBodyTypedDict,
        SearchPassagesResponseTypedDict,
        Verses,
        VersesTypedDict,
    )
    from .security import Security, SecurityTypedDict

__all__ = [
    "APIError",
    "Error",
    "ErrorData",
    "GetPassageAudioRequest",
    "GetPassageAudioRequestTypedDict",
    "GetPassageHTMLRequest",
    "GetPassageHTMLRequestTypedDict",
    "GetPassageTextRequest",
    "GetPassageTextRequestTypedDict",
    "IndentUsing",
    "PassageMeta",
    "PassageMetaTypedDict",
    "PassageResponse",
    "PassageResponseTypedDict",
    "Results",
    "ResultsTypedDict",
    "SearchPassagesRequest",
    "SearchPassagesRequestTypedDict",
    "SearchPassagesResponse",
    "SearchPassagesResponseBody",
    "SearchPassagesResponseBodyTypedDict",
    "SearchPassagesResponseTypedDict",
    "Security",
    "SecurityTypedDict",
    "Verses",
    "VersesTypedDict",
]

_dynamic_imports: dict[str, str] = {
    "APIError": ".apierror",
    "Error": ".error",
    "ErrorData": ".error",
    "GetPassageAudioRequest": ".getpassageaudioop",
    "GetPassageAudioRequestTypedDict": ".getpassageaudioop",
    "GetPassageHTMLRequest": ".getpassagehtmlop",
    "GetPassageHTMLRequestTypedDict": ".getpassagehtmlop",
    "GetPassageTextRequest": ".getpassagetextop",
    "GetPassageTextRequestTypedDict": ".getpassagetextop",
    "IndentUsing": ".getpassagetextop",
    "PassageMeta": ".passagemeta",
    "PassageMetaTypedDict": ".passagemeta",
    "PassageResponse": ".passageresponse",
    "PassageResponseTypedDict": ".passageresponse",
    "Results": ".searchpassagesop",
    "ResultsTypedDict": ".searchpassagesop",
    "SearchPassagesRequest": ".searchpassagesop",
    "SearchPassagesRequestTypedDict": ".searchpassagesop",
    "SearchPassagesResponse": ".searchpassagesop",
    "SearchPassagesResponseBody": ".searchpassagesop",
    "SearchPassagesResponseBodyTypedDict": ".searchpassagesop",
    "SearchPassagesResponseTypedDict": ".searchpassagesop",
    "Verses": ".searchpassagesop",
    "VersesTypedDict": ".searchpassagesop",
    "Security": ".security",
    "SecurityTypedDict": ".security",
}


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)
