# 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 . import atoms, waves
    from .atoms.helpers.atoms_client import AtomsClient
    from .atoms.client import AsyncAtomsClient
    from .client import AsyncSmallestAI, SmallestAI
    from .version import __version__
    from .waves.async_waves_client import AsyncWavesClient
    from .waves.waves_client import WavesClient
    from .waves.stream_tts import WavesStreamingTTS
    # OpenAPI backward-compat: API classes
    from .atoms.api.agent_templates_api import AgentTemplatesApi
    from .atoms.api.agents_api import AgentsApi
    from .atoms.api.calls_api import CallsApi
    from .atoms.api.campaigns_api import CampaignsApi
    from .atoms.api.knowledge_base_api import KnowledgeBaseApi
    from .atoms.api.logs_api import LogsApi
    from .atoms.api.organization_api import OrganizationApi
    from .atoms.api.user_api import UserApi
    # OpenAPI backward-compat: infrastructure
    from .atoms.api_response import ApiResponse
    from .atoms.api_client import ApiClient
    from .atoms.configuration import Configuration
    from .atoms.exceptions import (
        OpenApiException,
        ApiTypeError,
        ApiValueError,
        ApiKeyError,
        ApiAttributeError,
        ApiException,
    )
    # OpenAPI backward-compat: models
    from .atoms.models import (
        AgentDTO,
        AgentDTOLanguage,
        AgentDTOSynthesizer,
        AgentDTOSynthesizerVoiceConfig,
        AgentFromTemplatePost200Response,
        AgentGet200Response,
        AgentIdDelete200Response,
        AgentIdGet200Response,
        AgentIdPatch200Response,
        AgentIdPatchRequest,
        AgentIdPatchRequestLanguage,
        AgentIdPatchRequestSynthesizer,
        AgentIdPatchRequestSynthesizerVoiceConfig,
        AgentIdPatchRequestSynthesizerVoiceConfigOneOf,
        AgentIdPatchRequestSynthesizerVoiceConfigOneOf1,
        AgentTemplateGet200Response,
        AgentTemplateGet200ResponseDataInner,
        BadRequestErrorResponse,
        CreateAgentFromTemplateRequest,
        CreateAgentRequest,
        CreateAgentRequestLanguage,
        CreateAgentRequestLanguageSynthesizer,
        CreateAgentRequestLanguageSynthesizerVoiceConfig,
        CampaignPost201Response,
        CampaignPostRequest,
        CampaignGetRequest,
        CampaignGet200Response,
        CampaignIdGet200Response,
        ConversationIdGet200Response,
        ConversationIdGet200ResponseData,
        ConversationOutboundPost200Response,
        ConversationOutboundPost200ResponseData,
        ConversationOutboundPostRequest,
        InternalServerErrorResponse,
        KnowledgebaseIdGet200Response,
        KnowledgebasePost201Response,
        KnowledgebasePostRequest,
        KnowledgebaseIdItemsUploadTextPostRequest,
        OrganizationGet200Response,
        OrganizationGet200ResponseData,
        OrganizationGet200ResponseDataMembersInner,
        OrganizationGet200ResponseDataSubscription,
        UnauthorizedErrorReponse,
        UserGet200Response,
        UserGet200ResponseData,
        AgentAgentIdWebhookSubscriptionsDelete200Response,
        AgentAgentIdWebhookSubscriptionsGet200Response,
        AgentAgentIdWebhookSubscriptionsGet404Response,
        AgentAgentIdWebhookSubscriptionsPost201Response,
        AgentAgentIdWebhookSubscriptionsPost400Response,
        AgentAgentIdWebhookSubscriptionsPostRequest,
        Webhook,
        WebhookAgent,
        WebhookEvent,
        WebhookGet200Response,
        WebhookGet200ResponseData,
        WebhookIdDelete404Response,
        WebhookPost201Response,
        WebhookPostRequest,
        WebhookPostRequestEventsInner,
        WebhookSubscription,
        WebhookSubscriptionPopulated,
        AgentIdWorkflowGet200Response,
        AgentIdWorkflowGet200ResponseData,
        AgentIdWorkflowGet200ResponseDataEdgesInner,
        AgentIdWorkflowGet200ResponseDataEdgesInnerData,
        AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd,
        AgentIdWorkflowGet200ResponseDataNodesInner,
        AgentIdWorkflowGet200ResponseDataNodesInnerData,
        AgentIdWorkflowGet200ResponseDataNodesInnerDataVariables,
        AgentIdWorkflowGet200ResponseDataNodesInnerDataVariablesDataInner,
        AgentIdWorkflowGet200ResponseDataNodesInnerPosition,
        AgentIdWorkflowGet404Response,
        AudienceGet200Response,
        AudienceGet200ResponseDataInner,
        AudienceIdDelete200Response,
        AudienceIdDelete400Response,
        AudienceIdGet200Response,
        AudienceIdGet400Response,
        AudienceIdGet403Response,
        AudienceIdGet404Response,
        AudienceIdMembersDelete200Response,
        AudienceIdMembersDelete200ResponseData,
        AudienceIdMembersDeleteRequest,
        AudienceIdMembersGet200Response,
        AudienceIdMembersGet200ResponseData,
        AudienceIdMembersGet200ResponseDataMembersInner,
        AudienceIdMembersGet400Response,
        AudienceIdMembersGet500Response,
        AudienceIdMembersPost200Response,
        AudienceIdMembersPost200ResponseDataInner,
        AudienceIdMembersPost200ResponseDataInnerData,
        AudienceIdMembersPost400Response,
        AudienceIdMembersPost403Response,
        AudienceIdMembersPostRequest,
        AudienceIdMembersSearchGet200Response,
        AudienceIdMembersSearchGet200ResponseData,
        AudienceIdMembersSearchGet200ResponseDataSearchInfo,
        AudienceIdMembersSearchGet400Response,
        AudienceIdMembersSearchGet500Response,
        AudiencePost200Response,
        AudiencePost200ResponseData,
        AudiencePost400Response,
        AgentDTOLanguageSwitching,
        CampaignIdGet200ResponseData,
    )

_dynamic_imports: typing.Dict[str, str] = {
    # Submodules
    "atoms": ".atoms",
    "waves": ".waves",
    # Version
    "__version__": ".version",
    # Fern clients
    "AsyncAtomsClient": ".atoms.client",
    "AsyncSmallestAI": ".client",
    "SmallestAI": ".client",
    # Production clients (matching v4.3.1 behavior)
    "AtomsClient": ".atoms.atoms_client",
    "Audience": ".atoms.helpers.audience",
    "Call": ".atoms.helpers.call",
    "Campaign": ".atoms.helpers.campaign",
    "KB": ".atoms.helpers.kb",
    "AsyncWavesClient": ".waves.async_waves_client",
    "WavesClient": ".waves.waves_client",
    "WavesStreamingTTS": ".waves.stream_tts",
    "TTSConfig": ".waves.stream_tts",
    # OpenAPI backward-compat: API classes
    "AgentTemplatesApi": ".atoms.api.agent_templates_api",
    "AgentsApi": ".atoms.api.agents_api",
    "CallsApi": ".atoms.api.calls_api",
    "CampaignsApi": ".atoms.api.campaigns_api",
    "KnowledgeBaseApi": ".atoms.api.knowledge_base_api",
    "LogsApi": ".atoms.api.logs_api",
    "OrganizationApi": ".atoms.api.organization_api",
    "UserApi": ".atoms.api.user_api",
    # OpenAPI backward-compat: infrastructure
    "ApiResponse": ".atoms.api_response",
    "ApiClient": ".atoms.api_client",
    "Configuration": ".atoms.configuration",
    "OpenApiException": ".atoms.exceptions",
    "ApiTypeError": ".atoms.exceptions",
    "ApiValueError": ".atoms.exceptions",
    "ApiKeyError": ".atoms.exceptions",
    "ApiAttributeError": ".atoms.exceptions",
    "ApiException": ".atoms.exceptions",
    # OpenAPI backward-compat: models
    "AgentDTO": ".atoms.models",
    "AgentDTOLanguage": ".atoms.models",
    "AgentDTOSynthesizer": ".atoms.models",
    "AgentDTOSynthesizerVoiceConfig": ".atoms.models",
    "AgentFromTemplatePost200Response": ".atoms.models",
    "AgentGet200Response": ".atoms.models",
    "AgentIdDelete200Response": ".atoms.models",
    "AgentIdGet200Response": ".atoms.models",
    "AgentIdPatch200Response": ".atoms.models",
    "AgentIdPatchRequest": ".atoms.models",
    "AgentIdPatchRequestLanguage": ".atoms.models",
    "AgentIdPatchRequestSynthesizer": ".atoms.models",
    "AgentIdPatchRequestSynthesizerVoiceConfig": ".atoms.models",
    "AgentIdPatchRequestSynthesizerVoiceConfigOneOf": ".atoms.models",
    "AgentIdPatchRequestSynthesizerVoiceConfigOneOf1": ".atoms.models",
    "AgentTemplateGet200Response": ".atoms.models",
    "AgentTemplateGet200ResponseDataInner": ".atoms.models",
    "BadRequestErrorResponse": ".atoms.models",
    "CreateAgentFromTemplateRequest": ".atoms.models",
    "CreateAgentRequest": ".atoms.models",
    "CreateAgentRequestLanguage": ".atoms.models",
    "CreateAgentRequestLanguageSynthesizer": ".atoms.models",
    "CreateAgentRequestLanguageSynthesizerVoiceConfig": ".atoms.models",
    "CampaignPost201Response": ".atoms.models",
    "CampaignPostRequest": ".atoms.models",
    "CampaignGetRequest": ".atoms.models",
    "CampaignGet200Response": ".atoms.models",
    "CampaignIdGet200Response": ".atoms.models",
    "ConversationIdGet200Response": ".atoms.models",
    "ConversationIdGet200ResponseData": ".atoms.models",
    "ConversationOutboundPost200Response": ".atoms.models",
    "ConversationOutboundPost200ResponseData": ".atoms.models",
    "ConversationOutboundPostRequest": ".atoms.models",
    "InternalServerErrorResponse": ".atoms.models",
    "KnowledgebaseIdGet200Response": ".atoms.models",
    "KnowledgebasePost201Response": ".atoms.models",
    "KnowledgebasePostRequest": ".atoms.models",
    "KnowledgebaseIdItemsUploadTextPostRequest": ".atoms.models",
    "OrganizationGet200Response": ".atoms.models",
    "OrganizationGet200ResponseData": ".atoms.models",
    "OrganizationGet200ResponseDataMembersInner": ".atoms.models",
    "OrganizationGet200ResponseDataSubscription": ".atoms.models",
    "UnauthorizedErrorReponse": ".atoms.models",
    "UserGet200Response": ".atoms.models",
    "UserGet200ResponseData": ".atoms.models",
    # Additional models from v4.3.1
    "AgentGet200ResponseData": ".atoms.models",
    "AgentIdPatchRequestLanguageSwitching": ".atoms.models",
    "CampaignGet200ResponseData": ".atoms.models",
    "KnowledgeBase": ".atoms.models",
    "KnowledgeBaseItem": ".atoms.models",
    "KnowledgebaseGet200Response": ".atoms.models",
    "KnowledgebaseIdItemsGet200Response": ".atoms.models",
    "ProductPhoneNumbersGet200Response": ".atoms.models",
    "ProductPhoneNumbersGet200ResponseDataInner": ".atoms.models",
    "ProductPhoneNumbersGet200ResponseDataInnerAttributes": ".atoms.models",
    # Webhook models
    "AgentAgentIdWebhookSubscriptionsDelete200Response": ".atoms.models",
    "AgentAgentIdWebhookSubscriptionsGet200Response": ".atoms.models",
    "AgentAgentIdWebhookSubscriptionsGet404Response": ".atoms.models",
    "AgentAgentIdWebhookSubscriptionsPost201Response": ".atoms.models",
    "AgentAgentIdWebhookSubscriptionsPost400Response": ".atoms.models",
    "AgentAgentIdWebhookSubscriptionsPostRequest": ".atoms.models",
    "Webhook": ".atoms.models",
    "WebhookAgent": ".atoms.models",
    "WebhookEvent": ".atoms.models",
    "WebhookGet200Response": ".atoms.models",
    "WebhookGet200ResponseData": ".atoms.models",
    "WebhookIdDelete404Response": ".atoms.models",
    "WebhookPost201Response": ".atoms.models",
    "WebhookPostRequest": ".atoms.models",
    "WebhookPostRequestEventsInner": ".atoms.models",
    "WebhookSubscription": ".atoms.models",
    "WebhookSubscriptionPopulated": ".atoms.models",
    # Workflow models
    "AgentIdWorkflowGet200Response": ".atoms.models",
    "AgentIdWorkflowGet200ResponseData": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataEdgesInner": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataEdgesInnerData": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataNodesInner": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataNodesInnerData": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataNodesInnerDataVariables": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataNodesInnerDataVariablesDataInner": ".atoms.models",
    "AgentIdWorkflowGet200ResponseDataNodesInnerPosition": ".atoms.models",
    "AgentIdWorkflowGet404Response": ".atoms.models",
    # Audience models
    "AudienceGet200Response": ".atoms.models",
    "AudienceGet200ResponseDataInner": ".atoms.models",
    "AudienceIdDelete200Response": ".atoms.models",
    "AudienceIdDelete400Response": ".atoms.models",
    "AudienceIdGet200Response": ".atoms.models",
    "AudienceIdGet400Response": ".atoms.models",
    "AudienceIdGet403Response": ".atoms.models",
    "AudienceIdGet404Response": ".atoms.models",
    "AudienceIdMembersDelete200Response": ".atoms.models",
    "AudienceIdMembersDelete200ResponseData": ".atoms.models",
    "AudienceIdMembersDeleteRequest": ".atoms.models",
    "AudienceIdMembersGet200Response": ".atoms.models",
    "AudienceIdMembersGet200ResponseData": ".atoms.models",
    "AudienceIdMembersGet200ResponseDataMembersInner": ".atoms.models",
    "AudienceIdMembersGet400Response": ".atoms.models",
    "AudienceIdMembersGet500Response": ".atoms.models",
    "AudienceIdMembersPost200Response": ".atoms.models",
    "AudienceIdMembersPost200ResponseDataInner": ".atoms.models",
    "AudienceIdMembersPost200ResponseDataInnerData": ".atoms.models",
    "AudienceIdMembersPost400Response": ".atoms.models",
    "AudienceIdMembersPost403Response": ".atoms.models",
    "AudienceIdMembersPostRequest": ".atoms.models",
    "AudienceIdMembersSearchGet200Response": ".atoms.models",
    "AudienceIdMembersSearchGet200ResponseData": ".atoms.models",
    "AudienceIdMembersSearchGet200ResponseDataSearchInfo": ".atoms.models",
    "AudienceIdMembersSearchGet400Response": ".atoms.models",
    "AudienceIdMembersSearchGet500Response": ".atoms.models",
    "AudiencePost200Response": ".atoms.models",
    "AudiencePost200ResponseData": ".atoms.models",
    "AudiencePost400Response": ".atoms.models",
    # Additional models
    "AgentDTOLanguageSwitching": ".atoms.models",
    "CampaignIdGet200ResponseData": ".atoms.models",
}


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__ = [
    # Submodules
    "atoms",
    "waves",
    # Version
    "__version__",
    # Clients
    "AsyncAtomsClient",
    "AsyncSmallestAI",
    "AsyncWavesClient",
    "AtomsClient",
    "Audience",
    "Call",
    "Campaign",
    "KB",
    "SmallestAI",
    "WavesClient",
    "WavesStreamingTTS",
    "TTSConfig",
    # OpenAPI backward-compat: API classes
    "AgentTemplatesApi",
    "AgentsApi",
    "CallsApi",
    "CampaignsApi",
    "KnowledgeBaseApi",
    "LogsApi",
    "OrganizationApi",
    "UserApi",
    # OpenAPI backward-compat: infrastructure
    "ApiResponse",
    "ApiClient",
    "Configuration",
    "OpenApiException",
    "ApiTypeError",
    "ApiValueError",
    "ApiKeyError",
    "ApiAttributeError",
    "ApiException",
    # OpenAPI backward-compat: models
    "AgentDTO",
    "AgentDTOLanguage",
    "AgentDTOSynthesizer",
    "AgentDTOSynthesizerVoiceConfig",
    "AgentFromTemplatePost200Response",
    "AgentGet200Response",
    "AgentIdDelete200Response",
    "AgentIdGet200Response",
    "AgentIdPatch200Response",
    "AgentIdPatchRequest",
    "AgentIdPatchRequestLanguage",
    "AgentIdPatchRequestSynthesizer",
    "AgentIdPatchRequestSynthesizerVoiceConfig",
    "AgentIdPatchRequestSynthesizerVoiceConfigOneOf",
    "AgentIdPatchRequestSynthesizerVoiceConfigOneOf1",
    "AgentTemplateGet200Response",
    "AgentTemplateGet200ResponseDataInner",
    "BadRequestErrorResponse",
    "CreateAgentFromTemplateRequest",
    "CreateAgentRequest",
    "CreateAgentRequestLanguage",
    "CreateAgentRequestLanguageSynthesizer",
    "CreateAgentRequestLanguageSynthesizerVoiceConfig",
    "CampaignPost201Response",
    "CampaignPostRequest",
    "CampaignGetRequest",
    "CampaignGet200Response",
    "CampaignIdGet200Response",
    "ConversationIdGet200Response",
    "ConversationIdGet200ResponseData",
    "ConversationOutboundPost200Response",
    "ConversationOutboundPost200ResponseData",
    "ConversationOutboundPostRequest",
    "InternalServerErrorResponse",
    "KnowledgebaseIdGet200Response",
    "KnowledgebasePost201Response",
    "KnowledgebasePostRequest",
    "KnowledgebaseIdItemsUploadTextPostRequest",
    "OrganizationGet200Response",
    "OrganizationGet200ResponseData",
    "OrganizationGet200ResponseDataMembersInner",
    "OrganizationGet200ResponseDataSubscription",
    "UnauthorizedErrorReponse",
    "UserGet200Response",
    "UserGet200ResponseData",
    # Additional models from v4.3.1
    "AgentGet200ResponseData",
    "AgentIdPatchRequestLanguageSwitching",
    "CampaignGet200ResponseData",
    "KnowledgeBase",
    "KnowledgeBaseItem",
    "KnowledgebaseGet200Response",
    "KnowledgebaseIdItemsGet200Response",
    "ProductPhoneNumbersGet200Response",
    "ProductPhoneNumbersGet200ResponseDataInner",
    "ProductPhoneNumbersGet200ResponseDataInnerAttributes",
    # Webhook models
    "AgentAgentIdWebhookSubscriptionsDelete200Response",
    "AgentAgentIdWebhookSubscriptionsGet200Response",
    "AgentAgentIdWebhookSubscriptionsGet404Response",
    "AgentAgentIdWebhookSubscriptionsPost201Response",
    "AgentAgentIdWebhookSubscriptionsPost400Response",
    "AgentAgentIdWebhookSubscriptionsPostRequest",
    "Webhook",
    "WebhookAgent",
    "WebhookEvent",
    "WebhookGet200Response",
    "WebhookGet200ResponseData",
    "WebhookIdDelete404Response",
    "WebhookPost201Response",
    "WebhookPostRequest",
    "WebhookPostRequestEventsInner",
    "WebhookSubscription",
    "WebhookSubscriptionPopulated",
    # Workflow models
    "AgentIdWorkflowGet200Response",
    "AgentIdWorkflowGet200ResponseData",
    "AgentIdWorkflowGet200ResponseDataEdgesInner",
    "AgentIdWorkflowGet200ResponseDataEdgesInnerData",
    "AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd",
    "AgentIdWorkflowGet200ResponseDataNodesInner",
    "AgentIdWorkflowGet200ResponseDataNodesInnerData",
    "AgentIdWorkflowGet200ResponseDataNodesInnerDataVariables",
    "AgentIdWorkflowGet200ResponseDataNodesInnerDataVariablesDataInner",
    "AgentIdWorkflowGet200ResponseDataNodesInnerPosition",
    "AgentIdWorkflowGet404Response",
    # Audience models
    "AudienceGet200Response",
    "AudienceGet200ResponseDataInner",
    "AudienceIdDelete200Response",
    "AudienceIdDelete400Response",
    "AudienceIdGet200Response",
    "AudienceIdGet400Response",
    "AudienceIdGet403Response",
    "AudienceIdGet404Response",
    "AudienceIdMembersDelete200Response",
    "AudienceIdMembersDelete200ResponseData",
    "AudienceIdMembersDeleteRequest",
    "AudienceIdMembersGet200Response",
    "AudienceIdMembersGet200ResponseData",
    "AudienceIdMembersGet200ResponseDataMembersInner",
    "AudienceIdMembersGet400Response",
    "AudienceIdMembersGet500Response",
    "AudienceIdMembersPost200Response",
    "AudienceIdMembersPost200ResponseDataInner",
    "AudienceIdMembersPost200ResponseDataInnerData",
    "AudienceIdMembersPost400Response",
    "AudienceIdMembersPost403Response",
    "AudienceIdMembersPostRequest",
    "AudienceIdMembersSearchGet200Response",
    "AudienceIdMembersSearchGet200ResponseData",
    "AudienceIdMembersSearchGet200ResponseDataSearchInfo",
    "AudienceIdMembersSearchGet400Response",
    "AudienceIdMembersSearchGet500Response",
    "AudiencePost200Response",
    "AudiencePost200ResponseData",
    "AudiencePost400Response",
    # Additional models
    "AgentDTOLanguageSwitching",
    "CampaignIdGet200ResponseData",
]
