# 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 (
        BaseScore,
        BaseScoreV1,
        BooleanScore,
        BooleanScoreV1,
        CategoricalScore,
        CategoricalScoreV1,
        Comment,
        CommentObjectType,
        ConfigCategory,
        CorrectionScore,
        CreateScoreValue,
        Dataset,
        DatasetItem,
        DatasetRun,
        DatasetRunItem,
        DatasetRunWithItems,
        DatasetStatus,
        MapValue,
        Model,
        ModelPrice,
        ModelUsageUnit,
        NumericScore,
        NumericScoreV1,
        Observation,
        ObservationLevel,
        ObservationV2,
        ObservationsView,
        PricingTier,
        PricingTierCondition,
        PricingTierInput,
        PricingTierOperator,
        Score,
        ScoreConfig,
        ScoreConfigDataType,
        ScoreDataType,
        ScoreSource,
        ScoreV1,
        ScoreV1_Boolean,
        ScoreV1_Categorical,
        ScoreV1_Numeric,
        Score_Boolean,
        Score_Categorical,
        Score_Correction,
        Score_Numeric,
        Session,
        SessionWithTraces,
        Trace,
        TraceWithDetails,
        TraceWithFullDetails,
        Usage,
    )
    from .errors import (
        AccessDeniedError,
        Error,
        MethodNotAllowedError,
        NotFoundError,
        UnauthorizedError,
    )
_dynamic_imports: typing.Dict[str, str] = {
    "AccessDeniedError": ".errors",
    "BaseScore": ".types",
    "BaseScoreV1": ".types",
    "BooleanScore": ".types",
    "BooleanScoreV1": ".types",
    "CategoricalScore": ".types",
    "CategoricalScoreV1": ".types",
    "Comment": ".types",
    "CommentObjectType": ".types",
    "ConfigCategory": ".types",
    "CorrectionScore": ".types",
    "CreateScoreValue": ".types",
    "Dataset": ".types",
    "DatasetItem": ".types",
    "DatasetRun": ".types",
    "DatasetRunItem": ".types",
    "DatasetRunWithItems": ".types",
    "DatasetStatus": ".types",
    "Error": ".errors",
    "MapValue": ".types",
    "MethodNotAllowedError": ".errors",
    "Model": ".types",
    "ModelPrice": ".types",
    "ModelUsageUnit": ".types",
    "NotFoundError": ".errors",
    "NumericScore": ".types",
    "NumericScoreV1": ".types",
    "Observation": ".types",
    "ObservationLevel": ".types",
    "ObservationV2": ".types",
    "ObservationsView": ".types",
    "PricingTier": ".types",
    "PricingTierCondition": ".types",
    "PricingTierInput": ".types",
    "PricingTierOperator": ".types",
    "Score": ".types",
    "ScoreConfig": ".types",
    "ScoreConfigDataType": ".types",
    "ScoreDataType": ".types",
    "ScoreSource": ".types",
    "ScoreV1": ".types",
    "ScoreV1_Boolean": ".types",
    "ScoreV1_Categorical": ".types",
    "ScoreV1_Numeric": ".types",
    "Score_Boolean": ".types",
    "Score_Categorical": ".types",
    "Score_Correction": ".types",
    "Score_Numeric": ".types",
    "Session": ".types",
    "SessionWithTraces": ".types",
    "Trace": ".types",
    "TraceWithDetails": ".types",
    "TraceWithFullDetails": ".types",
    "UnauthorizedError": ".errors",
    "Usage": ".types",
}


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__ = [
    "AccessDeniedError",
    "BaseScore",
    "BaseScoreV1",
    "BooleanScore",
    "BooleanScoreV1",
    "CategoricalScore",
    "CategoricalScoreV1",
    "Comment",
    "CommentObjectType",
    "ConfigCategory",
    "CorrectionScore",
    "CreateScoreValue",
    "Dataset",
    "DatasetItem",
    "DatasetRun",
    "DatasetRunItem",
    "DatasetRunWithItems",
    "DatasetStatus",
    "Error",
    "MapValue",
    "MethodNotAllowedError",
    "Model",
    "ModelPrice",
    "ModelUsageUnit",
    "NotFoundError",
    "NumericScore",
    "NumericScoreV1",
    "Observation",
    "ObservationLevel",
    "ObservationV2",
    "ObservationsView",
    "PricingTier",
    "PricingTierCondition",
    "PricingTierInput",
    "PricingTierOperator",
    "Score",
    "ScoreConfig",
    "ScoreConfigDataType",
    "ScoreDataType",
    "ScoreSource",
    "ScoreV1",
    "ScoreV1_Boolean",
    "ScoreV1_Categorical",
    "ScoreV1_Numeric",
    "Score_Boolean",
    "Score_Categorical",
    "Score_Correction",
    "Score_Numeric",
    "Session",
    "SessionWithTraces",
    "Trace",
    "TraceWithDetails",
    "TraceWithFullDetails",
    "UnauthorizedError",
    "Usage",
]
