# This file was auto-generated by Fern from our API Definition.

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .bytes_generation_request import BytesGenerationRequestParams
    from .cancellation_request import CancellationRequestParams
    from .chunk import ChunkParams
    from .contextful_chunk import ContextfulChunkParams
    from .contextful_generation_request import ContextfulGenerationRequestParams
    from .done import DoneParams
    from .generation_request import GenerationRequestParams
    from .output_format import OutputFormatParams
    from .response import ResponseParams, Response_ChunkParams, Response_DoneParams, Response_ErrorParams
    from .server_sent_event import ServerSentEventParams, ServerSentEvent_ChunkParams, ServerSentEvent_ErrorParams
    from .streaming_error import StreamingErrorParams
    from .streaming_generation_request import StreamingGenerationRequestParams
    from .streaming_output_format import StreamingOutputFormatParams
    from .voice import VoiceParams
_dynamic_imports: typing.Dict[str, str] = {
    "BytesGenerationRequestParams": ".bytes_generation_request",
    "CancellationRequestParams": ".cancellation_request",
    "ChunkParams": ".chunk",
    "ContextfulChunkParams": ".contextful_chunk",
    "ContextfulGenerationRequestParams": ".contextful_generation_request",
    "DoneParams": ".done",
    "GenerationRequestParams": ".generation_request",
    "OutputFormatParams": ".output_format",
    "ResponseParams": ".response",
    "Response_ChunkParams": ".response",
    "Response_DoneParams": ".response",
    "Response_ErrorParams": ".response",
    "ServerSentEventParams": ".server_sent_event",
    "ServerSentEvent_ChunkParams": ".server_sent_event",
    "ServerSentEvent_ErrorParams": ".server_sent_event",
    "StreamingErrorParams": ".streaming_error",
    "StreamingGenerationRequestParams": ".streaming_generation_request",
    "StreamingOutputFormatParams": ".streaming_output_format",
    "VoiceParams": ".voice",
}


def __getattr__(attr_name: str) -> typing.Any:
    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__)
        if module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    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)


__all__ = [
    "BytesGenerationRequestParams",
    "CancellationRequestParams",
    "ChunkParams",
    "ContextfulChunkParams",
    "ContextfulGenerationRequestParams",
    "DoneParams",
    "GenerationRequestParams",
    "OutputFormatParams",
    "ResponseParams",
    "Response_ChunkParams",
    "Response_DoneParams",
    "Response_ErrorParams",
    "ServerSentEventParams",
    "ServerSentEvent_ChunkParams",
    "ServerSentEvent_ErrorParams",
    "StreamingErrorParams",
    "StreamingGenerationRequestParams",
    "StreamingOutputFormatParams",
    "VoiceParams",
]
