"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from typing import TYPE_CHECKING
from importlib import import_module
import builtins

if TYPE_CHECKING:
    from .list_user_projects_v1_projects_getop import (
        ListUserProjectsV1ProjectsGetRequest,
        ListUserProjectsV1ProjectsGetRequestTypedDict,
    )
    from .projectcreate import ProjectCreate, ProjectCreateTypedDict
    from .projectcreated import ProjectCreated, ProjectCreatedTypedDict
    from .projectpublic import ProjectPublic, ProjectPublicTypedDict
    from .security import Security, SecurityTypedDict
    from .user import User, UserTypedDict
    from .validationerror import (
        Loc,
        LocTypedDict,
        ValidationError,
        ValidationErrorTypedDict,
    )

__all__ = [
    "ListUserProjectsV1ProjectsGetRequest",
    "ListUserProjectsV1ProjectsGetRequestTypedDict",
    "Loc",
    "LocTypedDict",
    "ProjectCreate",
    "ProjectCreateTypedDict",
    "ProjectCreated",
    "ProjectCreatedTypedDict",
    "ProjectPublic",
    "ProjectPublicTypedDict",
    "Security",
    "SecurityTypedDict",
    "User",
    "UserTypedDict",
    "ValidationError",
    "ValidationErrorTypedDict",
]

_dynamic_imports: dict[str, str] = {
    "ListUserProjectsV1ProjectsGetRequest": ".list_user_projects_v1_projects_getop",
    "ListUserProjectsV1ProjectsGetRequestTypedDict": ".list_user_projects_v1_projects_getop",
    "ProjectCreate": ".projectcreate",
    "ProjectCreateTypedDict": ".projectcreate",
    "ProjectCreated": ".projectcreated",
    "ProjectCreatedTypedDict": ".projectcreated",
    "ProjectPublic": ".projectpublic",
    "ProjectPublicTypedDict": ".projectpublic",
    "Security": ".security",
    "SecurityTypedDict": ".security",
    "User": ".user",
    "UserTypedDict": ".user",
    "Loc": ".validationerror",
    "LocTypedDict": ".validationerror",
    "ValidationError": ".validationerror",
    "ValidationErrorTypedDict": ".validationerror",
}


def __getattr__(attr_name: str) -> object:
    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__)
        result = getattr(module, attr_name)
        return result
    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 = builtins.list(_dynamic_imports.keys())
    return builtins.sorted(lazy_attrs)
