# 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 .account_usage_statistics_input import AccountUsageStatisticsInput
    from .account_usage_statistics_interval import AccountUsageStatisticsInterval
    from .account_usage_statistics_output import AccountUsageStatisticsOutput
    from .api_usage_data_transfer import ApiUsageDataTransfer
    from .api_usage_entry import ApiUsageEntry
    from .commodity_type_obj import CommodityTypeObj
    from .commodity_types_list import CommodityTypesList
    from .conversion import Conversion
    from .conversion_info import ConversionInfo
    from .conversion_query import ConversionQuery
    from .countries_list import CountriesList
    from .country_obj import CountryObj
    from .crypto_conversion import CryptoConversion
    from .crypto_conversion_query import CryptoConversionQuery
    from .crypto_exchange_item import CryptoExchangeItem
    from .crypto_exchanges_list import CryptoExchangesList
    from .cursor_page_t_customized_historical_raw_tick import CursorPageTCustomizedHistoricalRawTick
    from .cursor_page_t_customized_news_out import CursorPageTCustomizedNewsOut
    from .cursor_page_t_customized_symbols_out_full import CursorPageTCustomizedSymbolsOutFull
    from .cursor_page_t_customized_symbols_out_full_stocks import CursorPageTCustomizedSymbolsOutFullStocks
    from .error_details import ErrorDetails
    from .error_response_body import ErrorResponseBody
    from .historical_data_resolution import HistoricalDataResolution
    from .historical_ohlc_candle import HistoricalOhlcCandle
    from .historical_ohlc_response import HistoricalOhlcResponse
    from .historical_raw_tick import HistoricalRawTick
    from .http_validation_error import HttpValidationError
    from .last_quote import LastQuote
    from .last_quotes import LastQuotes
    from .market_holiday_response import MarketHolidayResponse
    from .market_response import MarketResponse
    from .market_status_response import MarketStatusResponse
    from .news_meta_data import NewsMetaData
    from .news_out import NewsOut
    from .status import Status
    from .stock_data_flat_response import StockDataFlatResponse
    from .symbols_out_full import SymbolsOutFull
    from .symbols_out_full_stocks import SymbolsOutFullStocks
    from .trading_hours_response import TradingHoursResponse
    from .validation_error import ValidationError
    from .validation_error_loc_item import ValidationErrorLocItem
    from .weekday import Weekday
_dynamic_imports: typing.Dict[str, str] = {
    "AccountUsageStatisticsInput": ".account_usage_statistics_input",
    "AccountUsageStatisticsInterval": ".account_usage_statistics_interval",
    "AccountUsageStatisticsOutput": ".account_usage_statistics_output",
    "ApiUsageDataTransfer": ".api_usage_data_transfer",
    "ApiUsageEntry": ".api_usage_entry",
    "CommodityTypeObj": ".commodity_type_obj",
    "CommodityTypesList": ".commodity_types_list",
    "Conversion": ".conversion",
    "ConversionInfo": ".conversion_info",
    "ConversionQuery": ".conversion_query",
    "CountriesList": ".countries_list",
    "CountryObj": ".country_obj",
    "CryptoConversion": ".crypto_conversion",
    "CryptoConversionQuery": ".crypto_conversion_query",
    "CryptoExchangeItem": ".crypto_exchange_item",
    "CryptoExchangesList": ".crypto_exchanges_list",
    "CursorPageTCustomizedHistoricalRawTick": ".cursor_page_t_customized_historical_raw_tick",
    "CursorPageTCustomizedNewsOut": ".cursor_page_t_customized_news_out",
    "CursorPageTCustomizedSymbolsOutFull": ".cursor_page_t_customized_symbols_out_full",
    "CursorPageTCustomizedSymbolsOutFullStocks": ".cursor_page_t_customized_symbols_out_full_stocks",
    "ErrorDetails": ".error_details",
    "ErrorResponseBody": ".error_response_body",
    "HistoricalDataResolution": ".historical_data_resolution",
    "HistoricalOhlcCandle": ".historical_ohlc_candle",
    "HistoricalOhlcResponse": ".historical_ohlc_response",
    "HistoricalRawTick": ".historical_raw_tick",
    "HttpValidationError": ".http_validation_error",
    "LastQuote": ".last_quote",
    "LastQuotes": ".last_quotes",
    "MarketHolidayResponse": ".market_holiday_response",
    "MarketResponse": ".market_response",
    "MarketStatusResponse": ".market_status_response",
    "NewsMetaData": ".news_meta_data",
    "NewsOut": ".news_out",
    "Status": ".status",
    "StockDataFlatResponse": ".stock_data_flat_response",
    "SymbolsOutFull": ".symbols_out_full",
    "SymbolsOutFullStocks": ".symbols_out_full_stocks",
    "TradingHoursResponse": ".trading_hours_response",
    "ValidationError": ".validation_error",
    "ValidationErrorLocItem": ".validation_error_loc_item",
    "Weekday": ".weekday",
}


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__ = [
    "AccountUsageStatisticsInput",
    "AccountUsageStatisticsInterval",
    "AccountUsageStatisticsOutput",
    "ApiUsageDataTransfer",
    "ApiUsageEntry",
    "CommodityTypeObj",
    "CommodityTypesList",
    "Conversion",
    "ConversionInfo",
    "ConversionQuery",
    "CountriesList",
    "CountryObj",
    "CryptoConversion",
    "CryptoConversionQuery",
    "CryptoExchangeItem",
    "CryptoExchangesList",
    "CursorPageTCustomizedHistoricalRawTick",
    "CursorPageTCustomizedNewsOut",
    "CursorPageTCustomizedSymbolsOutFull",
    "CursorPageTCustomizedSymbolsOutFullStocks",
    "ErrorDetails",
    "ErrorResponseBody",
    "HistoricalDataResolution",
    "HistoricalOhlcCandle",
    "HistoricalOhlcResponse",
    "HistoricalRawTick",
    "HttpValidationError",
    "LastQuote",
    "LastQuotes",
    "MarketHolidayResponse",
    "MarketResponse",
    "MarketStatusResponse",
    "NewsMetaData",
    "NewsOut",
    "Status",
    "StockDataFlatResponse",
    "SymbolsOutFull",
    "SymbolsOutFullStocks",
    "TradingHoursResponse",
    "ValidationError",
    "ValidationErrorLocItem",
    "Weekday",
]
