# 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 .types import (
        AdverseEffect,
        AdverseEffectFrequencyDetail,
        Alert,
        AlertSeverity,
        AlertType,
        BadRequestErrorBody,
        BlackBoxWarning,
        BlockedResponse,
        ClinicalAlert,
        ClinicalAlertSpecialNotes,
        ClinicalConcern,
        ClinicalData,
        Condition,
        DailyLimit,
        DailyLimitConfidence,
        DomainCode,
        DoseClassification,
        DoseClassificationConfidence,
        DoseClassificationReactionType,
        DoseComponent,
        DoseComponentConfidence,
        DosingData,
        DosingDataSource,
        DrugClinicalData,
        DrugSafetyCheckResponse,
        DrugSafetyCheckResponseStatus,
        ErrorResponse,
        ErrorResponseError,
        FoodConflict,
        FoodData,
        ForbiddenErrorBody,
        Interaction,
        InteractionSeverityName,
        InteractionSummary,
        InteractionsData,
        InternalServerErrorBody,
        MealTiming,
        Meta,
        MetaTier,
        MetadataResponse,
        MetadataResponseDatabaseStats,
        MetadataResponseDatabaseVersions,
        MetadataResponsePatientProfileOptions,
        MetadataResponseRiskScales,
        MetadataResponseStatus,
        MetadataResponseTier,
        Monitoring,
        PatientProfile,
        Population,
        PopulationMonitoring,
        PopulationMonitoringLiverFunctionGrades,
        RateLimitResponse,
        RateLimitResponseTier,
        ReferenceDose,
        ReproductiveSafetyData,
        ReproductiveWarning,
        ResolvedDrug,
        SafetyData,
        SideEffectsData,
        SideEffectsDataRiskLevel,
        TooManyRequestsErrorBody,
    )
    from .errors import BadRequestError, ForbiddenError, InternalServerError, TooManyRequestsError, UnauthorizedError
    from . import developers, drug_safety
    from .client import AsyncSafeRxClient, SafeRxClient
    from .developers import (
        CreateFreeKeyDevelopersResponse,
        CreateFreeKeyDevelopersResponseApiKey,
        CreateFreeKeyDevelopersResponseApiKeyLimits,
        CreateFreeKeyDevelopersResponseEmail,
        VerifyFreeKeyDevelopersResponse,
        VerifyFreeKeyDevelopersResponseLimits,
    )
    from .drug_safety import (
        DrugSafetyCheckRequestLang,
        GetDrugSafetyHealthResponse,
        GetDrugSafetyHealthResponseChecksValue,
        GetDrugSafetyHealthResponseChecksValueStatus,
        GetDrugSafetyHealthResponseStatus,
    )
    from .environment import SafeRxClientEnvironment
    from .version import __version__
_dynamic_imports: typing.Dict[str, str] = {
    "AdverseEffect": ".types",
    "AdverseEffectFrequencyDetail": ".types",
    "Alert": ".types",
    "AlertSeverity": ".types",
    "AlertType": ".types",
    "AsyncSafeRxClient": ".client",
    "BadRequestError": ".errors",
    "BadRequestErrorBody": ".types",
    "BlackBoxWarning": ".types",
    "BlockedResponse": ".types",
    "ClinicalAlert": ".types",
    "ClinicalAlertSpecialNotes": ".types",
    "ClinicalConcern": ".types",
    "ClinicalData": ".types",
    "Condition": ".types",
    "CreateFreeKeyDevelopersResponse": ".developers",
    "CreateFreeKeyDevelopersResponseApiKey": ".developers",
    "CreateFreeKeyDevelopersResponseApiKeyLimits": ".developers",
    "CreateFreeKeyDevelopersResponseEmail": ".developers",
    "DailyLimit": ".types",
    "DailyLimitConfidence": ".types",
    "DomainCode": ".types",
    "DoseClassification": ".types",
    "DoseClassificationConfidence": ".types",
    "DoseClassificationReactionType": ".types",
    "DoseComponent": ".types",
    "DoseComponentConfidence": ".types",
    "DosingData": ".types",
    "DosingDataSource": ".types",
    "DrugClinicalData": ".types",
    "DrugSafetyCheckRequestLang": ".drug_safety",
    "DrugSafetyCheckResponse": ".types",
    "DrugSafetyCheckResponseStatus": ".types",
    "ErrorResponse": ".types",
    "ErrorResponseError": ".types",
    "FoodConflict": ".types",
    "FoodData": ".types",
    "ForbiddenError": ".errors",
    "ForbiddenErrorBody": ".types",
    "GetDrugSafetyHealthResponse": ".drug_safety",
    "GetDrugSafetyHealthResponseChecksValue": ".drug_safety",
    "GetDrugSafetyHealthResponseChecksValueStatus": ".drug_safety",
    "GetDrugSafetyHealthResponseStatus": ".drug_safety",
    "Interaction": ".types",
    "InteractionSeverityName": ".types",
    "InteractionSummary": ".types",
    "InteractionsData": ".types",
    "InternalServerError": ".errors",
    "InternalServerErrorBody": ".types",
    "MealTiming": ".types",
    "Meta": ".types",
    "MetaTier": ".types",
    "MetadataResponse": ".types",
    "MetadataResponseDatabaseStats": ".types",
    "MetadataResponseDatabaseVersions": ".types",
    "MetadataResponsePatientProfileOptions": ".types",
    "MetadataResponseRiskScales": ".types",
    "MetadataResponseStatus": ".types",
    "MetadataResponseTier": ".types",
    "Monitoring": ".types",
    "PatientProfile": ".types",
    "Population": ".types",
    "PopulationMonitoring": ".types",
    "PopulationMonitoringLiverFunctionGrades": ".types",
    "RateLimitResponse": ".types",
    "RateLimitResponseTier": ".types",
    "ReferenceDose": ".types",
    "ReproductiveSafetyData": ".types",
    "ReproductiveWarning": ".types",
    "ResolvedDrug": ".types",
    "SafeRxClient": ".client",
    "SafeRxClientEnvironment": ".environment",
    "SafetyData": ".types",
    "SideEffectsData": ".types",
    "SideEffectsDataRiskLevel": ".types",
    "TooManyRequestsError": ".errors",
    "TooManyRequestsErrorBody": ".types",
    "UnauthorizedError": ".errors",
    "VerifyFreeKeyDevelopersResponse": ".developers",
    "VerifyFreeKeyDevelopersResponseLimits": ".developers",
    "__version__": ".version",
    "developers": ".developers",
    "drug_safety": ".drug_safety",
}


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__ = [
    "AdverseEffect",
    "AdverseEffectFrequencyDetail",
    "Alert",
    "AlertSeverity",
    "AlertType",
    "AsyncSafeRxClient",
    "BadRequestError",
    "BadRequestErrorBody",
    "BlackBoxWarning",
    "BlockedResponse",
    "ClinicalAlert",
    "ClinicalAlertSpecialNotes",
    "ClinicalConcern",
    "ClinicalData",
    "Condition",
    "CreateFreeKeyDevelopersResponse",
    "CreateFreeKeyDevelopersResponseApiKey",
    "CreateFreeKeyDevelopersResponseApiKeyLimits",
    "CreateFreeKeyDevelopersResponseEmail",
    "DailyLimit",
    "DailyLimitConfidence",
    "DomainCode",
    "DoseClassification",
    "DoseClassificationConfidence",
    "DoseClassificationReactionType",
    "DoseComponent",
    "DoseComponentConfidence",
    "DosingData",
    "DosingDataSource",
    "DrugClinicalData",
    "DrugSafetyCheckRequestLang",
    "DrugSafetyCheckResponse",
    "DrugSafetyCheckResponseStatus",
    "ErrorResponse",
    "ErrorResponseError",
    "FoodConflict",
    "FoodData",
    "ForbiddenError",
    "ForbiddenErrorBody",
    "GetDrugSafetyHealthResponse",
    "GetDrugSafetyHealthResponseChecksValue",
    "GetDrugSafetyHealthResponseChecksValueStatus",
    "GetDrugSafetyHealthResponseStatus",
    "Interaction",
    "InteractionSeverityName",
    "InteractionSummary",
    "InteractionsData",
    "InternalServerError",
    "InternalServerErrorBody",
    "MealTiming",
    "Meta",
    "MetaTier",
    "MetadataResponse",
    "MetadataResponseDatabaseStats",
    "MetadataResponseDatabaseVersions",
    "MetadataResponsePatientProfileOptions",
    "MetadataResponseRiskScales",
    "MetadataResponseStatus",
    "MetadataResponseTier",
    "Monitoring",
    "PatientProfile",
    "Population",
    "PopulationMonitoring",
    "PopulationMonitoringLiverFunctionGrades",
    "RateLimitResponse",
    "RateLimitResponseTier",
    "ReferenceDose",
    "ReproductiveSafetyData",
    "ReproductiveWarning",
    "ResolvedDrug",
    "SafeRxClient",
    "SafeRxClientEnvironment",
    "SafetyData",
    "SideEffectsData",
    "SideEffectsDataRiskLevel",
    "TooManyRequestsError",
    "TooManyRequestsErrorBody",
    "UnauthorizedError",
    "VerifyFreeKeyDevelopersResponse",
    "VerifyFreeKeyDevelopersResponseLimits",
    "__version__",
    "developers",
    "drug_safety",
]
