# 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 (
        AcpType,
        Agent,
        AgentApiKey,
        AgentApiKeyType,
        AgentInputType,
        AgentStatus,
        AgentTaskTracker,
        ApiKeyCreateResponse,
        ApiKeyListResponse,
        ApiKeyResponse,
        ApiKeyScope,
        ApiKeyScopeRole,
        AuthorizedOperationType,
        AuthzRequest,
        AuthzSearchResponse,
        BranchListResponse,
        BranchResponse,
        ClaudeMessageContent,
        CliRefreshResponse,
        CliTokenResponse,
        CreateApiKeyResponse,
        CrossEnvSecretResponse,
        CrossEnvSecretsListResponse,
        DataContent,
        DataPart,
        DeleteEnvResponse,
        DeleteEnvVarResponse,
        DeleteResponse,
        DeployResponse,
        DeployedSecretKey,
        DeployedSecretsResponse,
        EnvListResponse,
        EnvResponse,
        EnvSecretInfo,
        EnvVarListResponse,
        EnvVarResponse,
        EnvVarValue,
        ErrorPart,
        Event,
        FileAttachment,
        FilePart,
        FilesystemFile,
        FilesystemFileResponse,
        FilesystemResponse,
        FilesystemStatus,
        FinishPart,
        FinishReason,
        FinishStepPart,
        HttpValidationError,
        ListFilesResponse,
        ListMessagesV2Response,
        LogLevel,
        LogListResponse,
        LogQueryEntry,
        LogSource,
        MessageAuthor,
        MessageStyle,
        MetricsIngestionResponse,
        MigrateTasksResponse,
        Namespace,
        NamespaceStatus,
        OAuthInitiateResponse,
        OAuthTokenResponse,
        OrganizationResponse,
        OtlpAttribute,
        OtlpAttributeValue,
        OtlpBodyValue,
        OtlpLogIngestionResponse,
        OtlpLogRecord,
        OtlpResource,
        OtlpResourceLogs,
        OtlpScope,
        OtlpScopeLogs,
        PauseScheduleRequest,
        PresignedUrlRequest,
        PresignedUrlResponse,
        PrincipalContextEntity,
        PrincipalRequest,
        Project,
        PublishRawEventResponse,
        ReasoningContent,
        ReasoningDeltaPart,
        ReasoningEndPart,
        ReasoningPart,
        ReasoningStartPart,
        RedeployResponse,
        RegisterContainerResponse,
        RegistryAuthResponse,
        ResolveEnvResponse,
        RevokeAllResponse,
        RollbackRequest,
        RollbackResponse,
        ScheduleActionInfo,
        ScheduleListItem,
        ScheduleListResponse,
        ScheduleResponse,
        ScheduleSpecInfo,
        ScheduleState,
        SdkType,
        SetEnvVarResponse,
        SourceUrlPart,
        Span,
        StartPart,
        StartStepPart,
        State,
        StreamErrorPart,
        StreamMetadata,
        StreamUsage,
        SyncCompleteResponse,
        SystemFolderResponse,
        SystemFolderSyncCompleteResponse,
        SystemFolderType,
        SystemFolderTypeResponse,
        Task,
        TaskMessageContent,
        TaskMessageContent_ClaudeMessage,
        TaskMessageContent_Data,
        TaskMessageContent_Reasoning,
        TaskMessageContent_Text,
        TaskMessageContent_ToolRequest,
        TaskMessageContent_ToolResponse,
        TaskRelationships,
        TaskResponse,
        TaskStatus,
        TerminalUseResource,
        TerminalUseResourceType,
        TextContent,
        TextDeltaPart,
        TextEndPart,
        TextFormat,
        TextPart,
        TextStartPart,
        TextStreamPartWrapper,
        TextStreamPartWrapper_Error,
        TextStreamPartWrapper_Finish,
        TextStreamPartWrapper_FinishStep,
        TextStreamPartWrapper_ReasoningDelta,
        TextStreamPartWrapper_ReasoningEnd,
        TextStreamPartWrapper_ReasoningStart,
        TextStreamPartWrapper_Start,
        TextStreamPartWrapper_StartStep,
        TextStreamPartWrapper_TextDelta,
        TextStreamPartWrapper_TextEnd,
        TextStreamPartWrapper_TextStart,
        TextStreamPartWrapper_ToolCall,
        TextStreamPartWrapper_ToolInputDelta,
        TextStreamPartWrapper_ToolInputEnd,
        TextStreamPartWrapper_ToolInputStart,
        TextStreamPartWrapper_ToolResult,
        ToolCallPart,
        ToolInputDeltaPart,
        ToolInputEndPart,
        ToolInputStartPart,
        ToolPart,
        ToolPartState,
        ToolRequestContent,
        ToolResponseContent,
        ToolResultPart,
        TraceIngestionResponse,
        TupleMembershipRequest,
        TupleRoleRequest,
        UiMessage,
        UiMessageMetadata,
        UiMessagePartWrapper,
        UiMessagePartWrapper_Data,
        UiMessagePartWrapper_Error,
        UiMessagePartWrapper_File,
        UiMessagePartWrapper_Reasoning,
        UiMessagePartWrapper_SourceUrl,
        UiMessagePartWrapper_Text,
        UiMessagePartWrapper_Tool,
        UiMessageRole,
        UnpauseScheduleRequest,
        UpdateTaskRequest,
        Usage,
        ValidationError,
        ValidationErrorLocItem,
        VersionEventContent,
        VersionEventListResponse,
        VersionEventResponse,
        VersionEventTrigger,
        VersionEventType,
        VersionListResponse,
        VersionResponse,
        VersionStatus,
        VersionSummary,
    )
    from .errors import UnprocessableEntityError
    from . import (
        agent_api_keys,
        agent_task_tracker,
        agents,
        api_keys,
        authentication,
        authorization_internal,
        branches,
        cli_authentication,
        environments,
        events,
        filesystems,
        logs,
        messages_v2,
        namespaces,
        o_auth,
        organizations,
        projects,
        raw_events,
        registry,
        schedules,
        secrets,
        spans,
        states,
        tasks,
        telemetry,
        version_events,
        versions,
    )
    from .lib.client import AsyncTerminalUse, TerminalUse
    from .messages_v2 import MessagesV2ListRequestDirection
_dynamic_imports: typing.Dict[str, str] = {
    "AcpType": ".types",
    "Agent": ".types",
    "AgentApiKey": ".types",
    "AgentApiKeyType": ".types",
    "AgentInputType": ".types",
    "AgentStatus": ".types",
    "AgentTaskTracker": ".types",
    "ApiKeyCreateResponse": ".types",
    "ApiKeyListResponse": ".types",
    "ApiKeyResponse": ".types",
    "ApiKeyScope": ".types",
    "ApiKeyScopeRole": ".types",
    "AsyncTerminalUse": ".lib.client",
    "AuthorizedOperationType": ".types",
    "AuthzRequest": ".types",
    "AuthzSearchResponse": ".types",
    "BranchListResponse": ".types",
    "BranchResponse": ".types",
    "ClaudeMessageContent": ".types",
    "CliRefreshResponse": ".types",
    "CliTokenResponse": ".types",
    "CreateApiKeyResponse": ".types",
    "CrossEnvSecretResponse": ".types",
    "CrossEnvSecretsListResponse": ".types",
    "DataContent": ".types",
    "DataPart": ".types",
    "DeleteEnvResponse": ".types",
    "DeleteEnvVarResponse": ".types",
    "DeleteResponse": ".types",
    "DeployResponse": ".types",
    "DeployedSecretKey": ".types",
    "DeployedSecretsResponse": ".types",
    "EnvListResponse": ".types",
    "EnvResponse": ".types",
    "EnvSecretInfo": ".types",
    "EnvVarListResponse": ".types",
    "EnvVarResponse": ".types",
    "EnvVarValue": ".types",
    "ErrorPart": ".types",
    "Event": ".types",
    "FileAttachment": ".types",
    "FilePart": ".types",
    "FilesystemFile": ".types",
    "FilesystemFileResponse": ".types",
    "FilesystemResponse": ".types",
    "FilesystemStatus": ".types",
    "FinishPart": ".types",
    "FinishReason": ".types",
    "FinishStepPart": ".types",
    "HttpValidationError": ".types",
    "ListFilesResponse": ".types",
    "ListMessagesV2Response": ".types",
    "LogLevel": ".types",
    "LogListResponse": ".types",
    "LogQueryEntry": ".types",
    "LogSource": ".types",
    "MessageAuthor": ".types",
    "MessageStyle": ".types",
    "MessagesV2ListRequestDirection": ".messages_v2",
    "MetricsIngestionResponse": ".types",
    "MigrateTasksResponse": ".types",
    "Namespace": ".types",
    "NamespaceStatus": ".types",
    "OAuthInitiateResponse": ".types",
    "OAuthTokenResponse": ".types",
    "OrganizationResponse": ".types",
    "OtlpAttribute": ".types",
    "OtlpAttributeValue": ".types",
    "OtlpBodyValue": ".types",
    "OtlpLogIngestionResponse": ".types",
    "OtlpLogRecord": ".types",
    "OtlpResource": ".types",
    "OtlpResourceLogs": ".types",
    "OtlpScope": ".types",
    "OtlpScopeLogs": ".types",
    "PauseScheduleRequest": ".types",
    "PresignedUrlRequest": ".types",
    "PresignedUrlResponse": ".types",
    "PrincipalContextEntity": ".types",
    "PrincipalRequest": ".types",
    "Project": ".types",
    "PublishRawEventResponse": ".types",
    "ReasoningContent": ".types",
    "ReasoningDeltaPart": ".types",
    "ReasoningEndPart": ".types",
    "ReasoningPart": ".types",
    "ReasoningStartPart": ".types",
    "RedeployResponse": ".types",
    "RegisterContainerResponse": ".types",
    "RegistryAuthResponse": ".types",
    "ResolveEnvResponse": ".types",
    "RevokeAllResponse": ".types",
    "RollbackRequest": ".types",
    "RollbackResponse": ".types",
    "ScheduleActionInfo": ".types",
    "ScheduleListItem": ".types",
    "ScheduleListResponse": ".types",
    "ScheduleResponse": ".types",
    "ScheduleSpecInfo": ".types",
    "ScheduleState": ".types",
    "SdkType": ".types",
    "SetEnvVarResponse": ".types",
    "SourceUrlPart": ".types",
    "Span": ".types",
    "StartPart": ".types",
    "StartStepPart": ".types",
    "State": ".types",
    "StreamErrorPart": ".types",
    "StreamMetadata": ".types",
    "StreamUsage": ".types",
    "SyncCompleteResponse": ".types",
    "SystemFolderResponse": ".types",
    "SystemFolderSyncCompleteResponse": ".types",
    "SystemFolderType": ".types",
    "SystemFolderTypeResponse": ".types",
    "Task": ".types",
    "TaskMessageContent": ".types",
    "TaskMessageContent_ClaudeMessage": ".types",
    "TaskMessageContent_Data": ".types",
    "TaskMessageContent_Reasoning": ".types",
    "TaskMessageContent_Text": ".types",
    "TaskMessageContent_ToolRequest": ".types",
    "TaskMessageContent_ToolResponse": ".types",
    "TaskRelationships": ".types",
    "TaskResponse": ".types",
    "TaskStatus": ".types",
    "TerminalUseResource": ".types",
    "TerminalUseResourceType": ".types",
    "TerminalUse": ".lib.client",
    "TextContent": ".types",
    "TextDeltaPart": ".types",
    "TextEndPart": ".types",
    "TextFormat": ".types",
    "TextPart": ".types",
    "TextStartPart": ".types",
    "TextStreamPartWrapper": ".types",
    "TextStreamPartWrapper_Error": ".types",
    "TextStreamPartWrapper_Finish": ".types",
    "TextStreamPartWrapper_FinishStep": ".types",
    "TextStreamPartWrapper_ReasoningDelta": ".types",
    "TextStreamPartWrapper_ReasoningEnd": ".types",
    "TextStreamPartWrapper_ReasoningStart": ".types",
    "TextStreamPartWrapper_Start": ".types",
    "TextStreamPartWrapper_StartStep": ".types",
    "TextStreamPartWrapper_TextDelta": ".types",
    "TextStreamPartWrapper_TextEnd": ".types",
    "TextStreamPartWrapper_TextStart": ".types",
    "TextStreamPartWrapper_ToolCall": ".types",
    "TextStreamPartWrapper_ToolInputDelta": ".types",
    "TextStreamPartWrapper_ToolInputEnd": ".types",
    "TextStreamPartWrapper_ToolInputStart": ".types",
    "TextStreamPartWrapper_ToolResult": ".types",
    "ToolCallPart": ".types",
    "ToolInputDeltaPart": ".types",
    "ToolInputEndPart": ".types",
    "ToolInputStartPart": ".types",
    "ToolPart": ".types",
    "ToolPartState": ".types",
    "ToolRequestContent": ".types",
    "ToolResponseContent": ".types",
    "ToolResultPart": ".types",
    "TraceIngestionResponse": ".types",
    "TupleMembershipRequest": ".types",
    "TupleRoleRequest": ".types",
    "UiMessage": ".types",
    "UiMessageMetadata": ".types",
    "UiMessagePartWrapper": ".types",
    "UiMessagePartWrapper_Data": ".types",
    "UiMessagePartWrapper_Error": ".types",
    "UiMessagePartWrapper_File": ".types",
    "UiMessagePartWrapper_Reasoning": ".types",
    "UiMessagePartWrapper_SourceUrl": ".types",
    "UiMessagePartWrapper_Text": ".types",
    "UiMessagePartWrapper_Tool": ".types",
    "UiMessageRole": ".types",
    "UnpauseScheduleRequest": ".types",
    "UnprocessableEntityError": ".errors",
    "UpdateTaskRequest": ".types",
    "Usage": ".types",
    "ValidationError": ".types",
    "ValidationErrorLocItem": ".types",
    "VersionEventContent": ".types",
    "VersionEventListResponse": ".types",
    "VersionEventResponse": ".types",
    "VersionEventTrigger": ".types",
    "VersionEventType": ".types",
    "VersionListResponse": ".types",
    "VersionResponse": ".types",
    "VersionStatus": ".types",
    "VersionSummary": ".types",
    "agent_api_keys": ".agent_api_keys",
    "agent_task_tracker": ".agent_task_tracker",
    "agents": ".agents",
    "api_keys": ".api_keys",
    "authentication": ".authentication",
    "authorization_internal": ".authorization_internal",
    "branches": ".branches",
    "cli_authentication": ".cli_authentication",
    "environments": ".environments",
    "events": ".events",
    "filesystems": ".filesystems",
    "logs": ".logs",
    "messages_v2": ".messages_v2",
    "namespaces": ".namespaces",
    "o_auth": ".o_auth",
    "organizations": ".organizations",
    "projects": ".projects",
    "raw_events": ".raw_events",
    "registry": ".registry",
    "schedules": ".schedules",
    "secrets": ".secrets",
    "spans": ".spans",
    "states": ".states",
    "tasks": ".tasks",
    "telemetry": ".telemetry",
    "version_events": ".version_events",
    "versions": ".versions",
}


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__ = [
    "AcpType",
    "Agent",
    "AgentApiKey",
    "AgentApiKeyType",
    "AgentInputType",
    "AgentStatus",
    "AgentTaskTracker",
    "ApiKeyCreateResponse",
    "ApiKeyListResponse",
    "ApiKeyResponse",
    "ApiKeyScope",
    "ApiKeyScopeRole",
    "AsyncTerminalUse",
    "AuthorizedOperationType",
    "AuthzRequest",
    "AuthzSearchResponse",
    "BranchListResponse",
    "BranchResponse",
    "ClaudeMessageContent",
    "CliRefreshResponse",
    "CliTokenResponse",
    "CreateApiKeyResponse",
    "CrossEnvSecretResponse",
    "CrossEnvSecretsListResponse",
    "DataContent",
    "DataPart",
    "DeleteEnvResponse",
    "DeleteEnvVarResponse",
    "DeleteResponse",
    "DeployResponse",
    "DeployedSecretKey",
    "DeployedSecretsResponse",
    "EnvListResponse",
    "EnvResponse",
    "EnvSecretInfo",
    "EnvVarListResponse",
    "EnvVarResponse",
    "EnvVarValue",
    "ErrorPart",
    "Event",
    "FileAttachment",
    "FilePart",
    "FilesystemFile",
    "FilesystemFileResponse",
    "FilesystemResponse",
    "FilesystemStatus",
    "FinishPart",
    "FinishReason",
    "FinishStepPart",
    "HttpValidationError",
    "ListFilesResponse",
    "ListMessagesV2Response",
    "LogLevel",
    "LogListResponse",
    "LogQueryEntry",
    "LogSource",
    "MessageAuthor",
    "MessageStyle",
    "MessagesV2ListRequestDirection",
    "MetricsIngestionResponse",
    "MigrateTasksResponse",
    "Namespace",
    "NamespaceStatus",
    "OAuthInitiateResponse",
    "OAuthTokenResponse",
    "OrganizationResponse",
    "OtlpAttribute",
    "OtlpAttributeValue",
    "OtlpBodyValue",
    "OtlpLogIngestionResponse",
    "OtlpLogRecord",
    "OtlpResource",
    "OtlpResourceLogs",
    "OtlpScope",
    "OtlpScopeLogs",
    "PauseScheduleRequest",
    "PresignedUrlRequest",
    "PresignedUrlResponse",
    "PrincipalContextEntity",
    "PrincipalRequest",
    "Project",
    "PublishRawEventResponse",
    "ReasoningContent",
    "ReasoningDeltaPart",
    "ReasoningEndPart",
    "ReasoningPart",
    "ReasoningStartPart",
    "RedeployResponse",
    "RegisterContainerResponse",
    "RegistryAuthResponse",
    "ResolveEnvResponse",
    "RevokeAllResponse",
    "RollbackRequest",
    "RollbackResponse",
    "ScheduleActionInfo",
    "ScheduleListItem",
    "ScheduleListResponse",
    "ScheduleResponse",
    "ScheduleSpecInfo",
    "ScheduleState",
    "SdkType",
    "SetEnvVarResponse",
    "SourceUrlPart",
    "Span",
    "StartPart",
    "StartStepPart",
    "State",
    "StreamErrorPart",
    "StreamMetadata",
    "StreamUsage",
    "SyncCompleteResponse",
    "SystemFolderResponse",
    "SystemFolderSyncCompleteResponse",
    "SystemFolderType",
    "SystemFolderTypeResponse",
    "Task",
    "TaskMessageContent",
    "TaskMessageContent_ClaudeMessage",
    "TaskMessageContent_Data",
    "TaskMessageContent_Reasoning",
    "TaskMessageContent_Text",
    "TaskMessageContent_ToolRequest",
    "TaskMessageContent_ToolResponse",
    "TaskRelationships",
    "TaskResponse",
    "TaskStatus",
    "TerminalUseResource",
    "TerminalUseResourceType",
    "TerminalUse",
    "TextContent",
    "TextDeltaPart",
    "TextEndPart",
    "TextFormat",
    "TextPart",
    "TextStartPart",
    "TextStreamPartWrapper",
    "TextStreamPartWrapper_Error",
    "TextStreamPartWrapper_Finish",
    "TextStreamPartWrapper_FinishStep",
    "TextStreamPartWrapper_ReasoningDelta",
    "TextStreamPartWrapper_ReasoningEnd",
    "TextStreamPartWrapper_ReasoningStart",
    "TextStreamPartWrapper_Start",
    "TextStreamPartWrapper_StartStep",
    "TextStreamPartWrapper_TextDelta",
    "TextStreamPartWrapper_TextEnd",
    "TextStreamPartWrapper_TextStart",
    "TextStreamPartWrapper_ToolCall",
    "TextStreamPartWrapper_ToolInputDelta",
    "TextStreamPartWrapper_ToolInputEnd",
    "TextStreamPartWrapper_ToolInputStart",
    "TextStreamPartWrapper_ToolResult",
    "ToolCallPart",
    "ToolInputDeltaPart",
    "ToolInputEndPart",
    "ToolInputStartPart",
    "ToolPart",
    "ToolPartState",
    "ToolRequestContent",
    "ToolResponseContent",
    "ToolResultPart",
    "TraceIngestionResponse",
    "TupleMembershipRequest",
    "TupleRoleRequest",
    "UiMessage",
    "UiMessageMetadata",
    "UiMessagePartWrapper",
    "UiMessagePartWrapper_Data",
    "UiMessagePartWrapper_Error",
    "UiMessagePartWrapper_File",
    "UiMessagePartWrapper_Reasoning",
    "UiMessagePartWrapper_SourceUrl",
    "UiMessagePartWrapper_Text",
    "UiMessagePartWrapper_Tool",
    "UiMessageRole",
    "UnpauseScheduleRequest",
    "UnprocessableEntityError",
    "UpdateTaskRequest",
    "Usage",
    "ValidationError",
    "ValidationErrorLocItem",
    "VersionEventContent",
    "VersionEventListResponse",
    "VersionEventResponse",
    "VersionEventTrigger",
    "VersionEventType",
    "VersionListResponse",
    "VersionResponse",
    "VersionStatus",
    "VersionSummary",
    "agent_api_keys",
    "agent_task_tracker",
    "agents",
    "api_keys",
    "authentication",
    "authorization_internal",
    "branches",
    "cli_authentication",
    "environments",
    "events",
    "filesystems",
    "logs",
    "messages_v2",
    "namespaces",
    "o_auth",
    "organizations",
    "projects",
    "raw_events",
    "registry",
    "schedules",
    "secrets",
    "spans",
    "states",
    "tasks",
    "telemetry",
    "version_events",
    "versions",
]
