# 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 .listen_v1close_stream import ListenV1CloseStream
    from .listen_v1close_stream_type import ListenV1CloseStreamType
    from .listen_v1finalize import ListenV1Finalize
    from .listen_v1finalize_type import ListenV1FinalizeType
    from .listen_v1keep_alive import ListenV1KeepAlive
    from .listen_v1keep_alive_type import ListenV1KeepAliveType
    from .listen_v1metadata import ListenV1Metadata
    from .listen_v1results import ListenV1Results
    from .listen_v1results_channel import ListenV1ResultsChannel
    from .listen_v1results_channel_alternatives_item import ListenV1ResultsChannelAlternativesItem
    from .listen_v1results_channel_alternatives_item_words_item import ListenV1ResultsChannelAlternativesItemWordsItem
    from .listen_v1results_entities_item import ListenV1ResultsEntitiesItem
    from .listen_v1results_metadata import ListenV1ResultsMetadata
    from .listen_v1results_metadata_model_info import ListenV1ResultsMetadataModelInfo
    from .listen_v1speech_started import ListenV1SpeechStarted
    from .listen_v1utterance_end import ListenV1UtteranceEnd
_dynamic_imports: typing.Dict[str, str] = {
    "ListenV1CloseStream": ".listen_v1close_stream",
    "ListenV1CloseStreamType": ".listen_v1close_stream_type",
    "ListenV1Finalize": ".listen_v1finalize",
    "ListenV1FinalizeType": ".listen_v1finalize_type",
    "ListenV1KeepAlive": ".listen_v1keep_alive",
    "ListenV1KeepAliveType": ".listen_v1keep_alive_type",
    "ListenV1Metadata": ".listen_v1metadata",
    "ListenV1Results": ".listen_v1results",
    "ListenV1ResultsChannel": ".listen_v1results_channel",
    "ListenV1ResultsChannelAlternativesItem": ".listen_v1results_channel_alternatives_item",
    "ListenV1ResultsChannelAlternativesItemWordsItem": ".listen_v1results_channel_alternatives_item_words_item",
    "ListenV1ResultsEntitiesItem": ".listen_v1results_entities_item",
    "ListenV1ResultsMetadata": ".listen_v1results_metadata",
    "ListenV1ResultsMetadataModelInfo": ".listen_v1results_metadata_model_info",
    "ListenV1SpeechStarted": ".listen_v1speech_started",
    "ListenV1UtteranceEnd": ".listen_v1utterance_end",
}


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__ = [
    "ListenV1CloseStream",
    "ListenV1CloseStreamType",
    "ListenV1Finalize",
    "ListenV1FinalizeType",
    "ListenV1KeepAlive",
    "ListenV1KeepAliveType",
    "ListenV1Metadata",
    "ListenV1Results",
    "ListenV1ResultsChannel",
    "ListenV1ResultsChannelAlternativesItem",
    "ListenV1ResultsChannelAlternativesItemWordsItem",
    "ListenV1ResultsEntitiesItem",
    "ListenV1ResultsMetadata",
    "ListenV1ResultsMetadataModelInfo",
    "ListenV1SpeechStarted",
    "ListenV1UtteranceEnd",
]
