# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

import httpx
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .core.logging import LogConfig, Logger
from .core.request_options import RequestOptions
from .environment import AitronosEnvironment
from .raw_client import AsyncRawAitronos, RawAitronos

if typing.TYPE_CHECKING:
    from .access_control.client import AccessControlClient, AsyncAccessControlClient
    from .admin_cache.client import AdminCacheClient, AsyncAdminCacheClient
    from .admin_connectors.client import AdminConnectorsClient, AsyncAdminConnectorsClient
    from .analytics_api_keys.client import AnalyticsApiKeysClient, AsyncAnalyticsApiKeysClient
    from .analytics_limits.client import AnalyticsLimitsClient, AsyncAnalyticsLimitsClient
    from .analytics_usage.client import AnalyticsUsageClient, AsyncAnalyticsUsageClient
    from .api_keys.client import ApiKeysClient, AsyncApiKeysClient
    from .assistant_mbp_configuration.client import (
        AssistantMbpConfigurationClient,
        AsyncAssistantMbpConfigurationClient,
    )
    from .assistants.client import AssistantsClient, AsyncAssistantsClient
    from .audio.client import AsyncAudioClient, AudioClient
    from .audio_services.client import AsyncAudioServicesClient, AudioServicesClient
    from .audit_log_v2.client import AsyncAuditLogV2Client, AuditLogV2Client
    from .authentication.client import AsyncAuthenticationClient, AuthenticationClient
    from .avatars.client import AsyncAvatarsClient, AvatarsClient
    from .config.client import AsyncConfigClient, ConfigClient
    from .connectors_data_pipeline.client import AsyncConnectorsDataPipelineClient, ConnectorsDataPipelineClient
    from .crew_management_admin.client import AsyncCrewManagementAdminClient, CrewManagementAdminClient
    from .crew_management_invitations.client import (
        AsyncCrewManagementInvitationsClient,
        CrewManagementInvitationsClient,
    )
    from .crew_management_members.client import AsyncCrewManagementMembersClient, CrewManagementMembersClient
    from .departments.client import AsyncDepartmentsClient, DepartmentsClient
    from .document_extraction.client import AsyncDocumentExtractionClient, DocumentExtractionClient
    from .entity_rules.client import AsyncEntityRulesClient, EntityRulesClient
    from .files.client import AsyncFilesClient, FilesClient
    from .flowplate_integration.client import AsyncFlowplateIntegrationClient, FlowplateIntegrationClient
    from .health.client import AsyncHealthClient, HealthClient
    from .icons.client import AsyncIconsClient, IconsClient
    from .image_operations.client import AsyncImageOperationsClient, ImageOperationsClient
    from .knowledge.client import AsyncKnowledgeClient, KnowledgeClient
    from .knowledge_connectors.client import AsyncKnowledgeConnectorsClient, KnowledgeConnectorsClient
    from .mcp.client import AsyncMcpClient, McpClient
    from .mcp_configurations.client import AsyncMcpConfigurationsClient, McpConfigurationsClient
    from .meeting_buddy.client import AsyncMeetingBuddyClient, MeetingBuddyClient
    from .meeting_buddy_analytics.client import AsyncMeetingBuddyAnalyticsClient, MeetingBuddyAnalyticsClient
    from .meeting_buddy_auto_join.client import AsyncMeetingBuddyAutoJoinClient, MeetingBuddyAutoJoinClient
    from .meeting_buddy_calendar.client import AsyncMeetingBuddyCalendarClient, MeetingBuddyCalendarClient
    from .meeting_buddy_compliance.client import AsyncMeetingBuddyComplianceClient, MeetingBuddyComplianceClient
    from .meeting_buddy_intelligence.client import AsyncMeetingBuddyIntelligenceClient, MeetingBuddyIntelligenceClient
    from .meeting_buddy_intelligence_config.client import (
        AsyncMeetingBuddyIntelligenceConfigClient,
        MeetingBuddyIntelligenceConfigClient,
    )
    from .meeting_buddy_internal.client import AsyncMeetingBuddyInternalClient, MeetingBuddyInternalClient
    from .meeting_buddy_knowledge.client import AsyncMeetingBuddyKnowledgeClient, MeetingBuddyKnowledgeClient
    from .meeting_buddy_live_intelligence.client import (
        AsyncMeetingBuddyLiveIntelligenceClient,
        MeetingBuddyLiveIntelligenceClient,
    )
    from .meeting_buddy_note_taker.client import AsyncMeetingBuddyNoteTakerClient, MeetingBuddyNoteTakerClient
    from .meeting_buddy_public.client import AsyncMeetingBuddyPublicClient, MeetingBuddyPublicClient
    from .meeting_buddy_revenue_intelligence.client import (
        AsyncMeetingBuddyRevenueIntelligenceClient,
        MeetingBuddyRevenueIntelligenceClient,
    )
    from .meeting_buddy_settings.client import AsyncMeetingBuddySettingsClient, MeetingBuddySettingsClient
    from .meeting_buddy_streaming.client import AsyncMeetingBuddyStreamingClient, MeetingBuddyStreamingClient
    from .meeting_buddy_vector_store_routing.client import (
        AsyncMeetingBuddyVectorStoreRoutingClient,
        MeetingBuddyVectorStoreRoutingClient,
    )
    from .meeting_buddy_voice_agent.client import AsyncMeetingBuddyVoiceAgentClient, MeetingBuddyVoiceAgentClient
    from .meeting_buddy_workflow_triggers.client import (
        AsyncMeetingBuddyWorkflowTriggersClient,
        MeetingBuddyWorkflowTriggersClient,
    )
    from .messages.client import AsyncMessagesClient, MessagesClient
    from .models.client import AsyncModelsClient, ModelsClient
    from .organizations.client import AsyncOrganizationsClient, OrganizationsClient
    from .personal_connectors.client import AsyncPersonalConnectorsClient, PersonalConnectorsClient
    from .pricing_tiers.client import AsyncPricingTiersClient, PricingTiersClient
    from .reference_data.client import AsyncReferenceDataClient, ReferenceDataClient
    from .responses.client import AsyncResponsesClient, ResponsesClient
    from .roles.client import AsyncRolesClient, RolesClient
    from .rule_access_rights.client import AsyncRuleAccessRightsClient, RuleAccessRightsClient
    from .rule_attachments.client import AsyncRuleAttachmentsClient, RuleAttachmentsClient
    from .rule_operations.client import AsyncRuleOperationsClient, RuleOperationsClient
    from .rule_statistics.client import AsyncRuleStatisticsClient, RuleStatisticsClient
    from .rules.client import AsyncRulesClient, RulesClient
    from .spaces.client import AsyncSpacesClient, SpacesClient
    from .store_files.client import AsyncStoreFilesClient, StoreFilesClient
    from .streamline.client import AsyncStreamlineClient, StreamlineClient
    from .threads.client import AsyncThreadsClient, ThreadsClient
    from .tools.client import AsyncToolsClient, ToolsClient
    from .user_management.client import AsyncUserManagementClient, UserManagementClient
    from .user_preferences.client import AsyncUserPreferencesClient, UserPreferencesClient
    from .users_v2.client import AsyncUsersV2Client, UsersV2Client
    from .vector_store_files.client import AsyncVectorStoreFilesClient, VectorStoreFilesClient
    from .vector_stores.client import AsyncVectorStoresClient, VectorStoresClient
    from .vision.client import AsyncVisionClient, VisionClient
    from .web_scraping.client import AsyncWebScrapingClient, WebScrapingClient
    from .webhooks.client import AsyncWebhooksClient, WebhooksClient
    from .workflows.client import AsyncWorkflowsClient, WorkflowsClient


class Aitronos:
    """
    Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.

    Parameters
    ----------
    base_url : typing.Optional[str]
        The base url to use for requests from the client.

    environment : AitronosEnvironment
        The environment to use for requests from the client. from .environment import AitronosEnvironment



        Defaults to AitronosEnvironment.DEFAULT



    api_key : str
    token : typing.Optional[typing.Union[str, typing.Callable[[], str]]]
    headers : typing.Optional[typing.Dict[str, str]]
        Additional headers to send with every request.

    timeout : typing.Optional[float]
        The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.

    follow_redirects : typing.Optional[bool]
        Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.

    httpx_client : typing.Optional[httpx.Client]
        The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.

    logging : typing.Optional[typing.Union[LogConfig, Logger]]
        Configure logging for the SDK. Accepts a LogConfig dict with 'level' (debug/info/warn/error), 'logger' (custom logger implementation), and 'silent' (boolean, defaults to True) fields. You can also pass a pre-configured Logger instance.

    Examples
    --------
    from aitronos import Aitronos

    client = Aitronos(
        api_key="YOUR_API_KEY",
        token="YOUR_TOKEN",
    )
    """

    def __init__(
        self,
        *,
        base_url: typing.Optional[str] = None,
        environment: AitronosEnvironment = AitronosEnvironment.DEFAULT,
        api_key: str,
        token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
        headers: typing.Optional[typing.Dict[str, str]] = None,
        timeout: typing.Optional[float] = None,
        follow_redirects: typing.Optional[bool] = True,
        httpx_client: typing.Optional[httpx.Client] = None,
        logging: typing.Optional[typing.Union[LogConfig, Logger]] = None,
    ):
        _defaulted_timeout = (
            timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
        )
        self._client_wrapper = SyncClientWrapper(
            base_url=_get_base_url(base_url=base_url, environment=environment),
            api_key=api_key,
            token=token,
            headers=headers,
            httpx_client=httpx_client
            if httpx_client is not None
            else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
            if follow_redirects is not None
            else httpx.Client(timeout=_defaulted_timeout),
            timeout=_defaulted_timeout,
            logging=logging,
        )
        self._raw_client = RawAitronos(client_wrapper=self._client_wrapper)
        self._health: typing.Optional[HealthClient] = None
        self._config: typing.Optional[ConfigClient] = None
        self._authentication: typing.Optional[AuthenticationClient] = None
        self._responses: typing.Optional[ResponsesClient] = None
        self._user_management: typing.Optional[UserManagementClient] = None
        self._pricing_tiers: typing.Optional[PricingTiersClient] = None
        self._organizations: typing.Optional[OrganizationsClient] = None
        self._roles: typing.Optional[RolesClient] = None
        self._api_keys: typing.Optional[ApiKeysClient] = None
        self._models: typing.Optional[ModelsClient] = None
        self._assistants: typing.Optional[AssistantsClient] = None
        self._reference_data: typing.Optional[ReferenceDataClient] = None
        self._tools: typing.Optional[ToolsClient] = None
        self._personal_connectors: typing.Optional[PersonalConnectorsClient] = None
        self._mcp_configurations: typing.Optional[McpConfigurationsClient] = None
        self._mcp: typing.Optional[McpClient] = None
        self._analytics_usage: typing.Optional[AnalyticsUsageClient] = None
        self._analytics_api_keys: typing.Optional[AnalyticsApiKeysClient] = None
        self._analytics_limits: typing.Optional[AnalyticsLimitsClient] = None
        self._streamline: typing.Optional[StreamlineClient] = None
        self._threads: typing.Optional[ThreadsClient] = None
        self._messages: typing.Optional[MessagesClient] = None
        self._crew_management_members: typing.Optional[CrewManagementMembersClient] = None
        self._users_v2: typing.Optional[UsersV2Client] = None
        self._crew_management_invitations: typing.Optional[CrewManagementInvitationsClient] = None
        self._crew_management_admin: typing.Optional[CrewManagementAdminClient] = None
        self._vector_stores: typing.Optional[VectorStoresClient] = None
        self._files: typing.Optional[FilesClient] = None
        self._vector_store_files: typing.Optional[VectorStoreFilesClient] = None
        self._rules: typing.Optional[RulesClient] = None
        self._rule_operations: typing.Optional[RuleOperationsClient] = None
        self._rule_statistics: typing.Optional[RuleStatisticsClient] = None
        self._entity_rules: typing.Optional[EntityRulesClient] = None
        self._rule_attachments: typing.Optional[RuleAttachmentsClient] = None
        self._rule_access_rights: typing.Optional[RuleAccessRightsClient] = None
        self._icons: typing.Optional[IconsClient] = None
        self._avatars: typing.Optional[AvatarsClient] = None
        self._image_operations: typing.Optional[ImageOperationsClient] = None
        self._vision: typing.Optional[VisionClient] = None
        self._document_extraction: typing.Optional[DocumentExtractionClient] = None
        self._web_scraping: typing.Optional[WebScrapingClient] = None
        self._admin_cache: typing.Optional[AdminCacheClient] = None
        self._admin_connectors: typing.Optional[AdminConnectorsClient] = None
        self._connectors_data_pipeline: typing.Optional[ConnectorsDataPipelineClient] = None
        self._workflows: typing.Optional[WorkflowsClient] = None
        self._webhooks: typing.Optional[WebhooksClient] = None
        self._flowplate_integration: typing.Optional[FlowplateIntegrationClient] = None
        self._spaces: typing.Optional[SpacesClient] = None
        self._access_control: typing.Optional[AccessControlClient] = None
        self._departments: typing.Optional[DepartmentsClient] = None
        self._user_preferences: typing.Optional[UserPreferencesClient] = None
        self._audit_log_v2: typing.Optional[AuditLogV2Client] = None
        self._knowledge: typing.Optional[KnowledgeClient] = None
        self._store_files: typing.Optional[StoreFilesClient] = None
        self._knowledge_connectors: typing.Optional[KnowledgeConnectorsClient] = None
        self._meeting_buddy: typing.Optional[MeetingBuddyClient] = None
        self._meeting_buddy_intelligence: typing.Optional[MeetingBuddyIntelligenceClient] = None
        self._meeting_buddy_analytics: typing.Optional[MeetingBuddyAnalyticsClient] = None
        self._meeting_buddy_internal: typing.Optional[MeetingBuddyInternalClient] = None
        self._meeting_buddy_calendar: typing.Optional[MeetingBuddyCalendarClient] = None
        self._meeting_buddy_auto_join: typing.Optional[MeetingBuddyAutoJoinClient] = None
        self._meeting_buddy_note_taker: typing.Optional[MeetingBuddyNoteTakerClient] = None
        self._meeting_buddy_streaming: typing.Optional[MeetingBuddyStreamingClient] = None
        self._meeting_buddy_live_intelligence: typing.Optional[MeetingBuddyLiveIntelligenceClient] = None
        self._meeting_buddy_intelligence_config: typing.Optional[MeetingBuddyIntelligenceConfigClient] = None
        self._meeting_buddy_vector_store_routing: typing.Optional[MeetingBuddyVectorStoreRoutingClient] = None
        self._assistant_mbp_configuration: typing.Optional[AssistantMbpConfigurationClient] = None
        self._meeting_buddy_revenue_intelligence: typing.Optional[MeetingBuddyRevenueIntelligenceClient] = None
        self._meeting_buddy_workflow_triggers: typing.Optional[MeetingBuddyWorkflowTriggersClient] = None
        self._meeting_buddy_knowledge: typing.Optional[MeetingBuddyKnowledgeClient] = None
        self._meeting_buddy_compliance: typing.Optional[MeetingBuddyComplianceClient] = None
        self._meeting_buddy_public: typing.Optional[MeetingBuddyPublicClient] = None
        self._meeting_buddy_settings: typing.Optional[MeetingBuddySettingsClient] = None
        self._meeting_buddy_voice_agent: typing.Optional[MeetingBuddyVoiceAgentClient] = None
        self._audio: typing.Optional[AudioClient] = None
        self._audio_services: typing.Optional[AudioServicesClient] = None

    @property
    def with_raw_response(self) -> RawAitronos:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAitronos
        """
        return self._raw_client

    def root_head_head(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
        """
        HEAD health check for frontend liveness polling.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.Dict[str, str]
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.root_head_head()
        """
        _response = self._raw_client.root_head_head(request_options=request_options)
        return _response.headers

    @property
    def health(self):
        if self._health is None:
            from .health.client import HealthClient  # noqa: E402

            self._health = HealthClient(client_wrapper=self._client_wrapper)
        return self._health

    @property
    def config(self):
        if self._config is None:
            from .config.client import ConfigClient  # noqa: E402

            self._config = ConfigClient(client_wrapper=self._client_wrapper)
        return self._config

    @property
    def authentication(self):
        if self._authentication is None:
            from .authentication.client import AuthenticationClient  # noqa: E402

            self._authentication = AuthenticationClient(client_wrapper=self._client_wrapper)
        return self._authentication

    @property
    def responses(self):
        if self._responses is None:
            from .responses.client import ResponsesClient  # noqa: E402

            self._responses = ResponsesClient(client_wrapper=self._client_wrapper)
        return self._responses

    @property
    def user_management(self):
        if self._user_management is None:
            from .user_management.client import UserManagementClient  # noqa: E402

            self._user_management = UserManagementClient(client_wrapper=self._client_wrapper)
        return self._user_management

    @property
    def pricing_tiers(self):
        if self._pricing_tiers is None:
            from .pricing_tiers.client import PricingTiersClient  # noqa: E402

            self._pricing_tiers = PricingTiersClient(client_wrapper=self._client_wrapper)
        return self._pricing_tiers

    @property
    def organizations(self):
        if self._organizations is None:
            from .organizations.client import OrganizationsClient  # noqa: E402

            self._organizations = OrganizationsClient(client_wrapper=self._client_wrapper)
        return self._organizations

    @property
    def roles(self):
        if self._roles is None:
            from .roles.client import RolesClient  # noqa: E402

            self._roles = RolesClient(client_wrapper=self._client_wrapper)
        return self._roles

    @property
    def api_keys(self):
        if self._api_keys is None:
            from .api_keys.client import ApiKeysClient  # noqa: E402

            self._api_keys = ApiKeysClient(client_wrapper=self._client_wrapper)
        return self._api_keys

    @property
    def models(self):
        if self._models is None:
            from .models.client import ModelsClient  # noqa: E402

            self._models = ModelsClient(client_wrapper=self._client_wrapper)
        return self._models

    @property
    def assistants(self):
        if self._assistants is None:
            from .assistants.client import AssistantsClient  # noqa: E402

            self._assistants = AssistantsClient(client_wrapper=self._client_wrapper)
        return self._assistants

    @property
    def reference_data(self):
        if self._reference_data is None:
            from .reference_data.client import ReferenceDataClient  # noqa: E402

            self._reference_data = ReferenceDataClient(client_wrapper=self._client_wrapper)
        return self._reference_data

    @property
    def tools(self):
        if self._tools is None:
            from .tools.client import ToolsClient  # noqa: E402

            self._tools = ToolsClient(client_wrapper=self._client_wrapper)
        return self._tools

    @property
    def personal_connectors(self):
        if self._personal_connectors is None:
            from .personal_connectors.client import PersonalConnectorsClient  # noqa: E402

            self._personal_connectors = PersonalConnectorsClient(client_wrapper=self._client_wrapper)
        return self._personal_connectors

    @property
    def mcp_configurations(self):
        if self._mcp_configurations is None:
            from .mcp_configurations.client import McpConfigurationsClient  # noqa: E402

            self._mcp_configurations = McpConfigurationsClient(client_wrapper=self._client_wrapper)
        return self._mcp_configurations

    @property
    def mcp(self):
        if self._mcp is None:
            from .mcp.client import McpClient  # noqa: E402

            self._mcp = McpClient(client_wrapper=self._client_wrapper)
        return self._mcp

    @property
    def analytics_usage(self):
        if self._analytics_usage is None:
            from .analytics_usage.client import AnalyticsUsageClient  # noqa: E402

            self._analytics_usage = AnalyticsUsageClient(client_wrapper=self._client_wrapper)
        return self._analytics_usage

    @property
    def analytics_api_keys(self):
        if self._analytics_api_keys is None:
            from .analytics_api_keys.client import AnalyticsApiKeysClient  # noqa: E402

            self._analytics_api_keys = AnalyticsApiKeysClient(client_wrapper=self._client_wrapper)
        return self._analytics_api_keys

    @property
    def analytics_limits(self):
        if self._analytics_limits is None:
            from .analytics_limits.client import AnalyticsLimitsClient  # noqa: E402

            self._analytics_limits = AnalyticsLimitsClient(client_wrapper=self._client_wrapper)
        return self._analytics_limits

    @property
    def streamline(self):
        if self._streamline is None:
            from .streamline.client import StreamlineClient  # noqa: E402

            self._streamline = StreamlineClient(client_wrapper=self._client_wrapper)
        return self._streamline

    @property
    def threads(self):
        if self._threads is None:
            from .threads.client import ThreadsClient  # noqa: E402

            self._threads = ThreadsClient(client_wrapper=self._client_wrapper)
        return self._threads

    @property
    def messages(self):
        if self._messages is None:
            from .messages.client import MessagesClient  # noqa: E402

            self._messages = MessagesClient(client_wrapper=self._client_wrapper)
        return self._messages

    @property
    def crew_management_members(self):
        if self._crew_management_members is None:
            from .crew_management_members.client import CrewManagementMembersClient  # noqa: E402

            self._crew_management_members = CrewManagementMembersClient(client_wrapper=self._client_wrapper)
        return self._crew_management_members

    @property
    def users_v2(self):
        if self._users_v2 is None:
            from .users_v2.client import UsersV2Client  # noqa: E402

            self._users_v2 = UsersV2Client(client_wrapper=self._client_wrapper)
        return self._users_v2

    @property
    def crew_management_invitations(self):
        if self._crew_management_invitations is None:
            from .crew_management_invitations.client import CrewManagementInvitationsClient  # noqa: E402

            self._crew_management_invitations = CrewManagementInvitationsClient(client_wrapper=self._client_wrapper)
        return self._crew_management_invitations

    @property
    def crew_management_admin(self):
        if self._crew_management_admin is None:
            from .crew_management_admin.client import CrewManagementAdminClient  # noqa: E402

            self._crew_management_admin = CrewManagementAdminClient(client_wrapper=self._client_wrapper)
        return self._crew_management_admin

    @property
    def vector_stores(self):
        if self._vector_stores is None:
            from .vector_stores.client import VectorStoresClient  # noqa: E402

            self._vector_stores = VectorStoresClient(client_wrapper=self._client_wrapper)
        return self._vector_stores

    @property
    def files(self):
        if self._files is None:
            from .files.client import FilesClient  # noqa: E402

            self._files = FilesClient(client_wrapper=self._client_wrapper)
        return self._files

    @property
    def vector_store_files(self):
        if self._vector_store_files is None:
            from .vector_store_files.client import VectorStoreFilesClient  # noqa: E402

            self._vector_store_files = VectorStoreFilesClient(client_wrapper=self._client_wrapper)
        return self._vector_store_files

    @property
    def rules(self):
        if self._rules is None:
            from .rules.client import RulesClient  # noqa: E402

            self._rules = RulesClient(client_wrapper=self._client_wrapper)
        return self._rules

    @property
    def rule_operations(self):
        if self._rule_operations is None:
            from .rule_operations.client import RuleOperationsClient  # noqa: E402

            self._rule_operations = RuleOperationsClient(client_wrapper=self._client_wrapper)
        return self._rule_operations

    @property
    def rule_statistics(self):
        if self._rule_statistics is None:
            from .rule_statistics.client import RuleStatisticsClient  # noqa: E402

            self._rule_statistics = RuleStatisticsClient(client_wrapper=self._client_wrapper)
        return self._rule_statistics

    @property
    def entity_rules(self):
        if self._entity_rules is None:
            from .entity_rules.client import EntityRulesClient  # noqa: E402

            self._entity_rules = EntityRulesClient(client_wrapper=self._client_wrapper)
        return self._entity_rules

    @property
    def rule_attachments(self):
        if self._rule_attachments is None:
            from .rule_attachments.client import RuleAttachmentsClient  # noqa: E402

            self._rule_attachments = RuleAttachmentsClient(client_wrapper=self._client_wrapper)
        return self._rule_attachments

    @property
    def rule_access_rights(self):
        if self._rule_access_rights is None:
            from .rule_access_rights.client import RuleAccessRightsClient  # noqa: E402

            self._rule_access_rights = RuleAccessRightsClient(client_wrapper=self._client_wrapper)
        return self._rule_access_rights

    @property
    def icons(self):
        if self._icons is None:
            from .icons.client import IconsClient  # noqa: E402

            self._icons = IconsClient(client_wrapper=self._client_wrapper)
        return self._icons

    @property
    def avatars(self):
        if self._avatars is None:
            from .avatars.client import AvatarsClient  # noqa: E402

            self._avatars = AvatarsClient(client_wrapper=self._client_wrapper)
        return self._avatars

    @property
    def image_operations(self):
        if self._image_operations is None:
            from .image_operations.client import ImageOperationsClient  # noqa: E402

            self._image_operations = ImageOperationsClient(client_wrapper=self._client_wrapper)
        return self._image_operations

    @property
    def vision(self):
        if self._vision is None:
            from .vision.client import VisionClient  # noqa: E402

            self._vision = VisionClient(client_wrapper=self._client_wrapper)
        return self._vision

    @property
    def document_extraction(self):
        if self._document_extraction is None:
            from .document_extraction.client import DocumentExtractionClient  # noqa: E402

            self._document_extraction = DocumentExtractionClient(client_wrapper=self._client_wrapper)
        return self._document_extraction

    @property
    def web_scraping(self):
        if self._web_scraping is None:
            from .web_scraping.client import WebScrapingClient  # noqa: E402

            self._web_scraping = WebScrapingClient(client_wrapper=self._client_wrapper)
        return self._web_scraping

    @property
    def admin_cache(self):
        if self._admin_cache is None:
            from .admin_cache.client import AdminCacheClient  # noqa: E402

            self._admin_cache = AdminCacheClient(client_wrapper=self._client_wrapper)
        return self._admin_cache

    @property
    def admin_connectors(self):
        if self._admin_connectors is None:
            from .admin_connectors.client import AdminConnectorsClient  # noqa: E402

            self._admin_connectors = AdminConnectorsClient(client_wrapper=self._client_wrapper)
        return self._admin_connectors

    @property
    def connectors_data_pipeline(self):
        if self._connectors_data_pipeline is None:
            from .connectors_data_pipeline.client import ConnectorsDataPipelineClient  # noqa: E402

            self._connectors_data_pipeline = ConnectorsDataPipelineClient(client_wrapper=self._client_wrapper)
        return self._connectors_data_pipeline

    @property
    def workflows(self):
        if self._workflows is None:
            from .workflows.client import WorkflowsClient  # noqa: E402

            self._workflows = WorkflowsClient(client_wrapper=self._client_wrapper)
        return self._workflows

    @property
    def webhooks(self):
        if self._webhooks is None:
            from .webhooks.client import WebhooksClient  # noqa: E402

            self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper)
        return self._webhooks

    @property
    def flowplate_integration(self):
        if self._flowplate_integration is None:
            from .flowplate_integration.client import FlowplateIntegrationClient  # noqa: E402

            self._flowplate_integration = FlowplateIntegrationClient(client_wrapper=self._client_wrapper)
        return self._flowplate_integration

    @property
    def spaces(self):
        if self._spaces is None:
            from .spaces.client import SpacesClient  # noqa: E402

            self._spaces = SpacesClient(client_wrapper=self._client_wrapper)
        return self._spaces

    @property
    def access_control(self):
        if self._access_control is None:
            from .access_control.client import AccessControlClient  # noqa: E402

            self._access_control = AccessControlClient(client_wrapper=self._client_wrapper)
        return self._access_control

    @property
    def departments(self):
        if self._departments is None:
            from .departments.client import DepartmentsClient  # noqa: E402

            self._departments = DepartmentsClient(client_wrapper=self._client_wrapper)
        return self._departments

    @property
    def user_preferences(self):
        if self._user_preferences is None:
            from .user_preferences.client import UserPreferencesClient  # noqa: E402

            self._user_preferences = UserPreferencesClient(client_wrapper=self._client_wrapper)
        return self._user_preferences

    @property
    def audit_log_v2(self):
        if self._audit_log_v2 is None:
            from .audit_log_v2.client import AuditLogV2Client  # noqa: E402

            self._audit_log_v2 = AuditLogV2Client(client_wrapper=self._client_wrapper)
        return self._audit_log_v2

    @property
    def knowledge(self):
        if self._knowledge is None:
            from .knowledge.client import KnowledgeClient  # noqa: E402

            self._knowledge = KnowledgeClient(client_wrapper=self._client_wrapper)
        return self._knowledge

    @property
    def store_files(self):
        if self._store_files is None:
            from .store_files.client import StoreFilesClient  # noqa: E402

            self._store_files = StoreFilesClient(client_wrapper=self._client_wrapper)
        return self._store_files

    @property
    def knowledge_connectors(self):
        if self._knowledge_connectors is None:
            from .knowledge_connectors.client import KnowledgeConnectorsClient  # noqa: E402

            self._knowledge_connectors = KnowledgeConnectorsClient(client_wrapper=self._client_wrapper)
        return self._knowledge_connectors

    @property
    def meeting_buddy(self):
        if self._meeting_buddy is None:
            from .meeting_buddy.client import MeetingBuddyClient  # noqa: E402

            self._meeting_buddy = MeetingBuddyClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy

    @property
    def meeting_buddy_intelligence(self):
        if self._meeting_buddy_intelligence is None:
            from .meeting_buddy_intelligence.client import MeetingBuddyIntelligenceClient  # noqa: E402

            self._meeting_buddy_intelligence = MeetingBuddyIntelligenceClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_intelligence

    @property
    def meeting_buddy_analytics(self):
        if self._meeting_buddy_analytics is None:
            from .meeting_buddy_analytics.client import MeetingBuddyAnalyticsClient  # noqa: E402

            self._meeting_buddy_analytics = MeetingBuddyAnalyticsClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_analytics

    @property
    def meeting_buddy_internal(self):
        if self._meeting_buddy_internal is None:
            from .meeting_buddy_internal.client import MeetingBuddyInternalClient  # noqa: E402

            self._meeting_buddy_internal = MeetingBuddyInternalClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_internal

    @property
    def meeting_buddy_calendar(self):
        if self._meeting_buddy_calendar is None:
            from .meeting_buddy_calendar.client import MeetingBuddyCalendarClient  # noqa: E402

            self._meeting_buddy_calendar = MeetingBuddyCalendarClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_calendar

    @property
    def meeting_buddy_auto_join(self):
        if self._meeting_buddy_auto_join is None:
            from .meeting_buddy_auto_join.client import MeetingBuddyAutoJoinClient  # noqa: E402

            self._meeting_buddy_auto_join = MeetingBuddyAutoJoinClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_auto_join

    @property
    def meeting_buddy_note_taker(self):
        if self._meeting_buddy_note_taker is None:
            from .meeting_buddy_note_taker.client import MeetingBuddyNoteTakerClient  # noqa: E402

            self._meeting_buddy_note_taker = MeetingBuddyNoteTakerClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_note_taker

    @property
    def meeting_buddy_streaming(self):
        if self._meeting_buddy_streaming is None:
            from .meeting_buddy_streaming.client import MeetingBuddyStreamingClient  # noqa: E402

            self._meeting_buddy_streaming = MeetingBuddyStreamingClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_streaming

    @property
    def meeting_buddy_live_intelligence(self):
        if self._meeting_buddy_live_intelligence is None:
            from .meeting_buddy_live_intelligence.client import MeetingBuddyLiveIntelligenceClient  # noqa: E402

            self._meeting_buddy_live_intelligence = MeetingBuddyLiveIntelligenceClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_live_intelligence

    @property
    def meeting_buddy_intelligence_config(self):
        if self._meeting_buddy_intelligence_config is None:
            from .meeting_buddy_intelligence_config.client import MeetingBuddyIntelligenceConfigClient  # noqa: E402

            self._meeting_buddy_intelligence_config = MeetingBuddyIntelligenceConfigClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_intelligence_config

    @property
    def meeting_buddy_vector_store_routing(self):
        if self._meeting_buddy_vector_store_routing is None:
            from .meeting_buddy_vector_store_routing.client import MeetingBuddyVectorStoreRoutingClient  # noqa: E402

            self._meeting_buddy_vector_store_routing = MeetingBuddyVectorStoreRoutingClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_vector_store_routing

    @property
    def assistant_mbp_configuration(self):
        if self._assistant_mbp_configuration is None:
            from .assistant_mbp_configuration.client import AssistantMbpConfigurationClient  # noqa: E402

            self._assistant_mbp_configuration = AssistantMbpConfigurationClient(client_wrapper=self._client_wrapper)
        return self._assistant_mbp_configuration

    @property
    def meeting_buddy_revenue_intelligence(self):
        if self._meeting_buddy_revenue_intelligence is None:
            from .meeting_buddy_revenue_intelligence.client import MeetingBuddyRevenueIntelligenceClient  # noqa: E402

            self._meeting_buddy_revenue_intelligence = MeetingBuddyRevenueIntelligenceClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_revenue_intelligence

    @property
    def meeting_buddy_workflow_triggers(self):
        if self._meeting_buddy_workflow_triggers is None:
            from .meeting_buddy_workflow_triggers.client import MeetingBuddyWorkflowTriggersClient  # noqa: E402

            self._meeting_buddy_workflow_triggers = MeetingBuddyWorkflowTriggersClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_workflow_triggers

    @property
    def meeting_buddy_knowledge(self):
        if self._meeting_buddy_knowledge is None:
            from .meeting_buddy_knowledge.client import MeetingBuddyKnowledgeClient  # noqa: E402

            self._meeting_buddy_knowledge = MeetingBuddyKnowledgeClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_knowledge

    @property
    def meeting_buddy_compliance(self):
        if self._meeting_buddy_compliance is None:
            from .meeting_buddy_compliance.client import MeetingBuddyComplianceClient  # noqa: E402

            self._meeting_buddy_compliance = MeetingBuddyComplianceClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_compliance

    @property
    def meeting_buddy_public(self):
        if self._meeting_buddy_public is None:
            from .meeting_buddy_public.client import MeetingBuddyPublicClient  # noqa: E402

            self._meeting_buddy_public = MeetingBuddyPublicClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_public

    @property
    def meeting_buddy_settings(self):
        if self._meeting_buddy_settings is None:
            from .meeting_buddy_settings.client import MeetingBuddySettingsClient  # noqa: E402

            self._meeting_buddy_settings = MeetingBuddySettingsClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_settings

    @property
    def meeting_buddy_voice_agent(self):
        if self._meeting_buddy_voice_agent is None:
            from .meeting_buddy_voice_agent.client import MeetingBuddyVoiceAgentClient  # noqa: E402

            self._meeting_buddy_voice_agent = MeetingBuddyVoiceAgentClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_voice_agent

    @property
    def audio(self):
        if self._audio is None:
            from .audio.client import AudioClient  # noqa: E402

            self._audio = AudioClient(client_wrapper=self._client_wrapper)
        return self._audio

    @property
    def audio_services(self):
        if self._audio_services is None:
            from .audio_services.client import AudioServicesClient  # noqa: E402

            self._audio_services = AudioServicesClient(client_wrapper=self._client_wrapper)
        return self._audio_services


class AsyncAitronos:
    """
    Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.

    Parameters
    ----------
    base_url : typing.Optional[str]
        The base url to use for requests from the client.

    environment : AitronosEnvironment
        The environment to use for requests from the client. from .environment import AitronosEnvironment



        Defaults to AitronosEnvironment.DEFAULT



    api_key : str
    token : typing.Optional[typing.Union[str, typing.Callable[[], str]]]
    headers : typing.Optional[typing.Dict[str, str]]
        Additional headers to send with every request.

    timeout : typing.Optional[float]
        The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.

    follow_redirects : typing.Optional[bool]
        Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.

    httpx_client : typing.Optional[httpx.AsyncClient]
        The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.

    logging : typing.Optional[typing.Union[LogConfig, Logger]]
        Configure logging for the SDK. Accepts a LogConfig dict with 'level' (debug/info/warn/error), 'logger' (custom logger implementation), and 'silent' (boolean, defaults to True) fields. You can also pass a pre-configured Logger instance.

    Examples
    --------
    from aitronos import AsyncAitronos

    client = AsyncAitronos(
        api_key="YOUR_API_KEY",
        token="YOUR_TOKEN",
    )
    """

    def __init__(
        self,
        *,
        base_url: typing.Optional[str] = None,
        environment: AitronosEnvironment = AitronosEnvironment.DEFAULT,
        api_key: str,
        token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
        headers: typing.Optional[typing.Dict[str, str]] = None,
        timeout: typing.Optional[float] = None,
        follow_redirects: typing.Optional[bool] = True,
        httpx_client: typing.Optional[httpx.AsyncClient] = None,
        logging: typing.Optional[typing.Union[LogConfig, Logger]] = None,
    ):
        _defaulted_timeout = (
            timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
        )
        self._client_wrapper = AsyncClientWrapper(
            base_url=_get_base_url(base_url=base_url, environment=environment),
            api_key=api_key,
            token=token,
            headers=headers,
            httpx_client=httpx_client
            if httpx_client is not None
            else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
            if follow_redirects is not None
            else httpx.AsyncClient(timeout=_defaulted_timeout),
            timeout=_defaulted_timeout,
            logging=logging,
        )
        self._raw_client = AsyncRawAitronos(client_wrapper=self._client_wrapper)
        self._health: typing.Optional[AsyncHealthClient] = None
        self._config: typing.Optional[AsyncConfigClient] = None
        self._authentication: typing.Optional[AsyncAuthenticationClient] = None
        self._responses: typing.Optional[AsyncResponsesClient] = None
        self._user_management: typing.Optional[AsyncUserManagementClient] = None
        self._pricing_tiers: typing.Optional[AsyncPricingTiersClient] = None
        self._organizations: typing.Optional[AsyncOrganizationsClient] = None
        self._roles: typing.Optional[AsyncRolesClient] = None
        self._api_keys: typing.Optional[AsyncApiKeysClient] = None
        self._models: typing.Optional[AsyncModelsClient] = None
        self._assistants: typing.Optional[AsyncAssistantsClient] = None
        self._reference_data: typing.Optional[AsyncReferenceDataClient] = None
        self._tools: typing.Optional[AsyncToolsClient] = None
        self._personal_connectors: typing.Optional[AsyncPersonalConnectorsClient] = None
        self._mcp_configurations: typing.Optional[AsyncMcpConfigurationsClient] = None
        self._mcp: typing.Optional[AsyncMcpClient] = None
        self._analytics_usage: typing.Optional[AsyncAnalyticsUsageClient] = None
        self._analytics_api_keys: typing.Optional[AsyncAnalyticsApiKeysClient] = None
        self._analytics_limits: typing.Optional[AsyncAnalyticsLimitsClient] = None
        self._streamline: typing.Optional[AsyncStreamlineClient] = None
        self._threads: typing.Optional[AsyncThreadsClient] = None
        self._messages: typing.Optional[AsyncMessagesClient] = None
        self._crew_management_members: typing.Optional[AsyncCrewManagementMembersClient] = None
        self._users_v2: typing.Optional[AsyncUsersV2Client] = None
        self._crew_management_invitations: typing.Optional[AsyncCrewManagementInvitationsClient] = None
        self._crew_management_admin: typing.Optional[AsyncCrewManagementAdminClient] = None
        self._vector_stores: typing.Optional[AsyncVectorStoresClient] = None
        self._files: typing.Optional[AsyncFilesClient] = None
        self._vector_store_files: typing.Optional[AsyncVectorStoreFilesClient] = None
        self._rules: typing.Optional[AsyncRulesClient] = None
        self._rule_operations: typing.Optional[AsyncRuleOperationsClient] = None
        self._rule_statistics: typing.Optional[AsyncRuleStatisticsClient] = None
        self._entity_rules: typing.Optional[AsyncEntityRulesClient] = None
        self._rule_attachments: typing.Optional[AsyncRuleAttachmentsClient] = None
        self._rule_access_rights: typing.Optional[AsyncRuleAccessRightsClient] = None
        self._icons: typing.Optional[AsyncIconsClient] = None
        self._avatars: typing.Optional[AsyncAvatarsClient] = None
        self._image_operations: typing.Optional[AsyncImageOperationsClient] = None
        self._vision: typing.Optional[AsyncVisionClient] = None
        self._document_extraction: typing.Optional[AsyncDocumentExtractionClient] = None
        self._web_scraping: typing.Optional[AsyncWebScrapingClient] = None
        self._admin_cache: typing.Optional[AsyncAdminCacheClient] = None
        self._admin_connectors: typing.Optional[AsyncAdminConnectorsClient] = None
        self._connectors_data_pipeline: typing.Optional[AsyncConnectorsDataPipelineClient] = None
        self._workflows: typing.Optional[AsyncWorkflowsClient] = None
        self._webhooks: typing.Optional[AsyncWebhooksClient] = None
        self._flowplate_integration: typing.Optional[AsyncFlowplateIntegrationClient] = None
        self._spaces: typing.Optional[AsyncSpacesClient] = None
        self._access_control: typing.Optional[AsyncAccessControlClient] = None
        self._departments: typing.Optional[AsyncDepartmentsClient] = None
        self._user_preferences: typing.Optional[AsyncUserPreferencesClient] = None
        self._audit_log_v2: typing.Optional[AsyncAuditLogV2Client] = None
        self._knowledge: typing.Optional[AsyncKnowledgeClient] = None
        self._store_files: typing.Optional[AsyncStoreFilesClient] = None
        self._knowledge_connectors: typing.Optional[AsyncKnowledgeConnectorsClient] = None
        self._meeting_buddy: typing.Optional[AsyncMeetingBuddyClient] = None
        self._meeting_buddy_intelligence: typing.Optional[AsyncMeetingBuddyIntelligenceClient] = None
        self._meeting_buddy_analytics: typing.Optional[AsyncMeetingBuddyAnalyticsClient] = None
        self._meeting_buddy_internal: typing.Optional[AsyncMeetingBuddyInternalClient] = None
        self._meeting_buddy_calendar: typing.Optional[AsyncMeetingBuddyCalendarClient] = None
        self._meeting_buddy_auto_join: typing.Optional[AsyncMeetingBuddyAutoJoinClient] = None
        self._meeting_buddy_note_taker: typing.Optional[AsyncMeetingBuddyNoteTakerClient] = None
        self._meeting_buddy_streaming: typing.Optional[AsyncMeetingBuddyStreamingClient] = None
        self._meeting_buddy_live_intelligence: typing.Optional[AsyncMeetingBuddyLiveIntelligenceClient] = None
        self._meeting_buddy_intelligence_config: typing.Optional[AsyncMeetingBuddyIntelligenceConfigClient] = None
        self._meeting_buddy_vector_store_routing: typing.Optional[AsyncMeetingBuddyVectorStoreRoutingClient] = None
        self._assistant_mbp_configuration: typing.Optional[AsyncAssistantMbpConfigurationClient] = None
        self._meeting_buddy_revenue_intelligence: typing.Optional[AsyncMeetingBuddyRevenueIntelligenceClient] = None
        self._meeting_buddy_workflow_triggers: typing.Optional[AsyncMeetingBuddyWorkflowTriggersClient] = None
        self._meeting_buddy_knowledge: typing.Optional[AsyncMeetingBuddyKnowledgeClient] = None
        self._meeting_buddy_compliance: typing.Optional[AsyncMeetingBuddyComplianceClient] = None
        self._meeting_buddy_public: typing.Optional[AsyncMeetingBuddyPublicClient] = None
        self._meeting_buddy_settings: typing.Optional[AsyncMeetingBuddySettingsClient] = None
        self._meeting_buddy_voice_agent: typing.Optional[AsyncMeetingBuddyVoiceAgentClient] = None
        self._audio: typing.Optional[AsyncAudioClient] = None
        self._audio_services: typing.Optional[AsyncAudioServicesClient] = None

    @property
    def with_raw_response(self) -> AsyncRawAitronos:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAitronos
        """
        return self._raw_client

    async def root_head_head(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
        """
        HEAD health check for frontend liveness polling.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.Dict[str, str]
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.root_head_head()


        asyncio.run(main())
        """
        _response = await self._raw_client.root_head_head(request_options=request_options)
        return _response.headers

    @property
    def health(self):
        if self._health is None:
            from .health.client import AsyncHealthClient  # noqa: E402

            self._health = AsyncHealthClient(client_wrapper=self._client_wrapper)
        return self._health

    @property
    def config(self):
        if self._config is None:
            from .config.client import AsyncConfigClient  # noqa: E402

            self._config = AsyncConfigClient(client_wrapper=self._client_wrapper)
        return self._config

    @property
    def authentication(self):
        if self._authentication is None:
            from .authentication.client import AsyncAuthenticationClient  # noqa: E402

            self._authentication = AsyncAuthenticationClient(client_wrapper=self._client_wrapper)
        return self._authentication

    @property
    def responses(self):
        if self._responses is None:
            from .responses.client import AsyncResponsesClient  # noqa: E402

            self._responses = AsyncResponsesClient(client_wrapper=self._client_wrapper)
        return self._responses

    @property
    def user_management(self):
        if self._user_management is None:
            from .user_management.client import AsyncUserManagementClient  # noqa: E402

            self._user_management = AsyncUserManagementClient(client_wrapper=self._client_wrapper)
        return self._user_management

    @property
    def pricing_tiers(self):
        if self._pricing_tiers is None:
            from .pricing_tiers.client import AsyncPricingTiersClient  # noqa: E402

            self._pricing_tiers = AsyncPricingTiersClient(client_wrapper=self._client_wrapper)
        return self._pricing_tiers

    @property
    def organizations(self):
        if self._organizations is None:
            from .organizations.client import AsyncOrganizationsClient  # noqa: E402

            self._organizations = AsyncOrganizationsClient(client_wrapper=self._client_wrapper)
        return self._organizations

    @property
    def roles(self):
        if self._roles is None:
            from .roles.client import AsyncRolesClient  # noqa: E402

            self._roles = AsyncRolesClient(client_wrapper=self._client_wrapper)
        return self._roles

    @property
    def api_keys(self):
        if self._api_keys is None:
            from .api_keys.client import AsyncApiKeysClient  # noqa: E402

            self._api_keys = AsyncApiKeysClient(client_wrapper=self._client_wrapper)
        return self._api_keys

    @property
    def models(self):
        if self._models is None:
            from .models.client import AsyncModelsClient  # noqa: E402

            self._models = AsyncModelsClient(client_wrapper=self._client_wrapper)
        return self._models

    @property
    def assistants(self):
        if self._assistants is None:
            from .assistants.client import AsyncAssistantsClient  # noqa: E402

            self._assistants = AsyncAssistantsClient(client_wrapper=self._client_wrapper)
        return self._assistants

    @property
    def reference_data(self):
        if self._reference_data is None:
            from .reference_data.client import AsyncReferenceDataClient  # noqa: E402

            self._reference_data = AsyncReferenceDataClient(client_wrapper=self._client_wrapper)
        return self._reference_data

    @property
    def tools(self):
        if self._tools is None:
            from .tools.client import AsyncToolsClient  # noqa: E402

            self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
        return self._tools

    @property
    def personal_connectors(self):
        if self._personal_connectors is None:
            from .personal_connectors.client import AsyncPersonalConnectorsClient  # noqa: E402

            self._personal_connectors = AsyncPersonalConnectorsClient(client_wrapper=self._client_wrapper)
        return self._personal_connectors

    @property
    def mcp_configurations(self):
        if self._mcp_configurations is None:
            from .mcp_configurations.client import AsyncMcpConfigurationsClient  # noqa: E402

            self._mcp_configurations = AsyncMcpConfigurationsClient(client_wrapper=self._client_wrapper)
        return self._mcp_configurations

    @property
    def mcp(self):
        if self._mcp is None:
            from .mcp.client import AsyncMcpClient  # noqa: E402

            self._mcp = AsyncMcpClient(client_wrapper=self._client_wrapper)
        return self._mcp

    @property
    def analytics_usage(self):
        if self._analytics_usage is None:
            from .analytics_usage.client import AsyncAnalyticsUsageClient  # noqa: E402

            self._analytics_usage = AsyncAnalyticsUsageClient(client_wrapper=self._client_wrapper)
        return self._analytics_usage

    @property
    def analytics_api_keys(self):
        if self._analytics_api_keys is None:
            from .analytics_api_keys.client import AsyncAnalyticsApiKeysClient  # noqa: E402

            self._analytics_api_keys = AsyncAnalyticsApiKeysClient(client_wrapper=self._client_wrapper)
        return self._analytics_api_keys

    @property
    def analytics_limits(self):
        if self._analytics_limits is None:
            from .analytics_limits.client import AsyncAnalyticsLimitsClient  # noqa: E402

            self._analytics_limits = AsyncAnalyticsLimitsClient(client_wrapper=self._client_wrapper)
        return self._analytics_limits

    @property
    def streamline(self):
        if self._streamline is None:
            from .streamline.client import AsyncStreamlineClient  # noqa: E402

            self._streamline = AsyncStreamlineClient(client_wrapper=self._client_wrapper)
        return self._streamline

    @property
    def threads(self):
        if self._threads is None:
            from .threads.client import AsyncThreadsClient  # noqa: E402

            self._threads = AsyncThreadsClient(client_wrapper=self._client_wrapper)
        return self._threads

    @property
    def messages(self):
        if self._messages is None:
            from .messages.client import AsyncMessagesClient  # noqa: E402

            self._messages = AsyncMessagesClient(client_wrapper=self._client_wrapper)
        return self._messages

    @property
    def crew_management_members(self):
        if self._crew_management_members is None:
            from .crew_management_members.client import AsyncCrewManagementMembersClient  # noqa: E402

            self._crew_management_members = AsyncCrewManagementMembersClient(client_wrapper=self._client_wrapper)
        return self._crew_management_members

    @property
    def users_v2(self):
        if self._users_v2 is None:
            from .users_v2.client import AsyncUsersV2Client  # noqa: E402

            self._users_v2 = AsyncUsersV2Client(client_wrapper=self._client_wrapper)
        return self._users_v2

    @property
    def crew_management_invitations(self):
        if self._crew_management_invitations is None:
            from .crew_management_invitations.client import AsyncCrewManagementInvitationsClient  # noqa: E402

            self._crew_management_invitations = AsyncCrewManagementInvitationsClient(
                client_wrapper=self._client_wrapper
            )
        return self._crew_management_invitations

    @property
    def crew_management_admin(self):
        if self._crew_management_admin is None:
            from .crew_management_admin.client import AsyncCrewManagementAdminClient  # noqa: E402

            self._crew_management_admin = AsyncCrewManagementAdminClient(client_wrapper=self._client_wrapper)
        return self._crew_management_admin

    @property
    def vector_stores(self):
        if self._vector_stores is None:
            from .vector_stores.client import AsyncVectorStoresClient  # noqa: E402

            self._vector_stores = AsyncVectorStoresClient(client_wrapper=self._client_wrapper)
        return self._vector_stores

    @property
    def files(self):
        if self._files is None:
            from .files.client import AsyncFilesClient  # noqa: E402

            self._files = AsyncFilesClient(client_wrapper=self._client_wrapper)
        return self._files

    @property
    def vector_store_files(self):
        if self._vector_store_files is None:
            from .vector_store_files.client import AsyncVectorStoreFilesClient  # noqa: E402

            self._vector_store_files = AsyncVectorStoreFilesClient(client_wrapper=self._client_wrapper)
        return self._vector_store_files

    @property
    def rules(self):
        if self._rules is None:
            from .rules.client import AsyncRulesClient  # noqa: E402

            self._rules = AsyncRulesClient(client_wrapper=self._client_wrapper)
        return self._rules

    @property
    def rule_operations(self):
        if self._rule_operations is None:
            from .rule_operations.client import AsyncRuleOperationsClient  # noqa: E402

            self._rule_operations = AsyncRuleOperationsClient(client_wrapper=self._client_wrapper)
        return self._rule_operations

    @property
    def rule_statistics(self):
        if self._rule_statistics is None:
            from .rule_statistics.client import AsyncRuleStatisticsClient  # noqa: E402

            self._rule_statistics = AsyncRuleStatisticsClient(client_wrapper=self._client_wrapper)
        return self._rule_statistics

    @property
    def entity_rules(self):
        if self._entity_rules is None:
            from .entity_rules.client import AsyncEntityRulesClient  # noqa: E402

            self._entity_rules = AsyncEntityRulesClient(client_wrapper=self._client_wrapper)
        return self._entity_rules

    @property
    def rule_attachments(self):
        if self._rule_attachments is None:
            from .rule_attachments.client import AsyncRuleAttachmentsClient  # noqa: E402

            self._rule_attachments = AsyncRuleAttachmentsClient(client_wrapper=self._client_wrapper)
        return self._rule_attachments

    @property
    def rule_access_rights(self):
        if self._rule_access_rights is None:
            from .rule_access_rights.client import AsyncRuleAccessRightsClient  # noqa: E402

            self._rule_access_rights = AsyncRuleAccessRightsClient(client_wrapper=self._client_wrapper)
        return self._rule_access_rights

    @property
    def icons(self):
        if self._icons is None:
            from .icons.client import AsyncIconsClient  # noqa: E402

            self._icons = AsyncIconsClient(client_wrapper=self._client_wrapper)
        return self._icons

    @property
    def avatars(self):
        if self._avatars is None:
            from .avatars.client import AsyncAvatarsClient  # noqa: E402

            self._avatars = AsyncAvatarsClient(client_wrapper=self._client_wrapper)
        return self._avatars

    @property
    def image_operations(self):
        if self._image_operations is None:
            from .image_operations.client import AsyncImageOperationsClient  # noqa: E402

            self._image_operations = AsyncImageOperationsClient(client_wrapper=self._client_wrapper)
        return self._image_operations

    @property
    def vision(self):
        if self._vision is None:
            from .vision.client import AsyncVisionClient  # noqa: E402

            self._vision = AsyncVisionClient(client_wrapper=self._client_wrapper)
        return self._vision

    @property
    def document_extraction(self):
        if self._document_extraction is None:
            from .document_extraction.client import AsyncDocumentExtractionClient  # noqa: E402

            self._document_extraction = AsyncDocumentExtractionClient(client_wrapper=self._client_wrapper)
        return self._document_extraction

    @property
    def web_scraping(self):
        if self._web_scraping is None:
            from .web_scraping.client import AsyncWebScrapingClient  # noqa: E402

            self._web_scraping = AsyncWebScrapingClient(client_wrapper=self._client_wrapper)
        return self._web_scraping

    @property
    def admin_cache(self):
        if self._admin_cache is None:
            from .admin_cache.client import AsyncAdminCacheClient  # noqa: E402

            self._admin_cache = AsyncAdminCacheClient(client_wrapper=self._client_wrapper)
        return self._admin_cache

    @property
    def admin_connectors(self):
        if self._admin_connectors is None:
            from .admin_connectors.client import AsyncAdminConnectorsClient  # noqa: E402

            self._admin_connectors = AsyncAdminConnectorsClient(client_wrapper=self._client_wrapper)
        return self._admin_connectors

    @property
    def connectors_data_pipeline(self):
        if self._connectors_data_pipeline is None:
            from .connectors_data_pipeline.client import AsyncConnectorsDataPipelineClient  # noqa: E402

            self._connectors_data_pipeline = AsyncConnectorsDataPipelineClient(client_wrapper=self._client_wrapper)
        return self._connectors_data_pipeline

    @property
    def workflows(self):
        if self._workflows is None:
            from .workflows.client import AsyncWorkflowsClient  # noqa: E402

            self._workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper)
        return self._workflows

    @property
    def webhooks(self):
        if self._webhooks is None:
            from .webhooks.client import AsyncWebhooksClient  # noqa: E402

            self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper)
        return self._webhooks

    @property
    def flowplate_integration(self):
        if self._flowplate_integration is None:
            from .flowplate_integration.client import AsyncFlowplateIntegrationClient  # noqa: E402

            self._flowplate_integration = AsyncFlowplateIntegrationClient(client_wrapper=self._client_wrapper)
        return self._flowplate_integration

    @property
    def spaces(self):
        if self._spaces is None:
            from .spaces.client import AsyncSpacesClient  # noqa: E402

            self._spaces = AsyncSpacesClient(client_wrapper=self._client_wrapper)
        return self._spaces

    @property
    def access_control(self):
        if self._access_control is None:
            from .access_control.client import AsyncAccessControlClient  # noqa: E402

            self._access_control = AsyncAccessControlClient(client_wrapper=self._client_wrapper)
        return self._access_control

    @property
    def departments(self):
        if self._departments is None:
            from .departments.client import AsyncDepartmentsClient  # noqa: E402

            self._departments = AsyncDepartmentsClient(client_wrapper=self._client_wrapper)
        return self._departments

    @property
    def user_preferences(self):
        if self._user_preferences is None:
            from .user_preferences.client import AsyncUserPreferencesClient  # noqa: E402

            self._user_preferences = AsyncUserPreferencesClient(client_wrapper=self._client_wrapper)
        return self._user_preferences

    @property
    def audit_log_v2(self):
        if self._audit_log_v2 is None:
            from .audit_log_v2.client import AsyncAuditLogV2Client  # noqa: E402

            self._audit_log_v2 = AsyncAuditLogV2Client(client_wrapper=self._client_wrapper)
        return self._audit_log_v2

    @property
    def knowledge(self):
        if self._knowledge is None:
            from .knowledge.client import AsyncKnowledgeClient  # noqa: E402

            self._knowledge = AsyncKnowledgeClient(client_wrapper=self._client_wrapper)
        return self._knowledge

    @property
    def store_files(self):
        if self._store_files is None:
            from .store_files.client import AsyncStoreFilesClient  # noqa: E402

            self._store_files = AsyncStoreFilesClient(client_wrapper=self._client_wrapper)
        return self._store_files

    @property
    def knowledge_connectors(self):
        if self._knowledge_connectors is None:
            from .knowledge_connectors.client import AsyncKnowledgeConnectorsClient  # noqa: E402

            self._knowledge_connectors = AsyncKnowledgeConnectorsClient(client_wrapper=self._client_wrapper)
        return self._knowledge_connectors

    @property
    def meeting_buddy(self):
        if self._meeting_buddy is None:
            from .meeting_buddy.client import AsyncMeetingBuddyClient  # noqa: E402

            self._meeting_buddy = AsyncMeetingBuddyClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy

    @property
    def meeting_buddy_intelligence(self):
        if self._meeting_buddy_intelligence is None:
            from .meeting_buddy_intelligence.client import AsyncMeetingBuddyIntelligenceClient  # noqa: E402

            self._meeting_buddy_intelligence = AsyncMeetingBuddyIntelligenceClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_intelligence

    @property
    def meeting_buddy_analytics(self):
        if self._meeting_buddy_analytics is None:
            from .meeting_buddy_analytics.client import AsyncMeetingBuddyAnalyticsClient  # noqa: E402

            self._meeting_buddy_analytics = AsyncMeetingBuddyAnalyticsClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_analytics

    @property
    def meeting_buddy_internal(self):
        if self._meeting_buddy_internal is None:
            from .meeting_buddy_internal.client import AsyncMeetingBuddyInternalClient  # noqa: E402

            self._meeting_buddy_internal = AsyncMeetingBuddyInternalClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_internal

    @property
    def meeting_buddy_calendar(self):
        if self._meeting_buddy_calendar is None:
            from .meeting_buddy_calendar.client import AsyncMeetingBuddyCalendarClient  # noqa: E402

            self._meeting_buddy_calendar = AsyncMeetingBuddyCalendarClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_calendar

    @property
    def meeting_buddy_auto_join(self):
        if self._meeting_buddy_auto_join is None:
            from .meeting_buddy_auto_join.client import AsyncMeetingBuddyAutoJoinClient  # noqa: E402

            self._meeting_buddy_auto_join = AsyncMeetingBuddyAutoJoinClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_auto_join

    @property
    def meeting_buddy_note_taker(self):
        if self._meeting_buddy_note_taker is None:
            from .meeting_buddy_note_taker.client import AsyncMeetingBuddyNoteTakerClient  # noqa: E402

            self._meeting_buddy_note_taker = AsyncMeetingBuddyNoteTakerClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_note_taker

    @property
    def meeting_buddy_streaming(self):
        if self._meeting_buddy_streaming is None:
            from .meeting_buddy_streaming.client import AsyncMeetingBuddyStreamingClient  # noqa: E402

            self._meeting_buddy_streaming = AsyncMeetingBuddyStreamingClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_streaming

    @property
    def meeting_buddy_live_intelligence(self):
        if self._meeting_buddy_live_intelligence is None:
            from .meeting_buddy_live_intelligence.client import AsyncMeetingBuddyLiveIntelligenceClient  # noqa: E402

            self._meeting_buddy_live_intelligence = AsyncMeetingBuddyLiveIntelligenceClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_live_intelligence

    @property
    def meeting_buddy_intelligence_config(self):
        if self._meeting_buddy_intelligence_config is None:
            from .meeting_buddy_intelligence_config.client import (
                AsyncMeetingBuddyIntelligenceConfigClient,  # noqa: E402
            )

            self._meeting_buddy_intelligence_config = AsyncMeetingBuddyIntelligenceConfigClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_intelligence_config

    @property
    def meeting_buddy_vector_store_routing(self):
        if self._meeting_buddy_vector_store_routing is None:
            from .meeting_buddy_vector_store_routing.client import (
                AsyncMeetingBuddyVectorStoreRoutingClient,  # noqa: E402
            )

            self._meeting_buddy_vector_store_routing = AsyncMeetingBuddyVectorStoreRoutingClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_vector_store_routing

    @property
    def assistant_mbp_configuration(self):
        if self._assistant_mbp_configuration is None:
            from .assistant_mbp_configuration.client import AsyncAssistantMbpConfigurationClient  # noqa: E402

            self._assistant_mbp_configuration = AsyncAssistantMbpConfigurationClient(
                client_wrapper=self._client_wrapper
            )
        return self._assistant_mbp_configuration

    @property
    def meeting_buddy_revenue_intelligence(self):
        if self._meeting_buddy_revenue_intelligence is None:
            from .meeting_buddy_revenue_intelligence.client import (
                AsyncMeetingBuddyRevenueIntelligenceClient,  # noqa: E402
            )

            self._meeting_buddy_revenue_intelligence = AsyncMeetingBuddyRevenueIntelligenceClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_revenue_intelligence

    @property
    def meeting_buddy_workflow_triggers(self):
        if self._meeting_buddy_workflow_triggers is None:
            from .meeting_buddy_workflow_triggers.client import AsyncMeetingBuddyWorkflowTriggersClient  # noqa: E402

            self._meeting_buddy_workflow_triggers = AsyncMeetingBuddyWorkflowTriggersClient(
                client_wrapper=self._client_wrapper
            )
        return self._meeting_buddy_workflow_triggers

    @property
    def meeting_buddy_knowledge(self):
        if self._meeting_buddy_knowledge is None:
            from .meeting_buddy_knowledge.client import AsyncMeetingBuddyKnowledgeClient  # noqa: E402

            self._meeting_buddy_knowledge = AsyncMeetingBuddyKnowledgeClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_knowledge

    @property
    def meeting_buddy_compliance(self):
        if self._meeting_buddy_compliance is None:
            from .meeting_buddy_compliance.client import AsyncMeetingBuddyComplianceClient  # noqa: E402

            self._meeting_buddy_compliance = AsyncMeetingBuddyComplianceClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_compliance

    @property
    def meeting_buddy_public(self):
        if self._meeting_buddy_public is None:
            from .meeting_buddy_public.client import AsyncMeetingBuddyPublicClient  # noqa: E402

            self._meeting_buddy_public = AsyncMeetingBuddyPublicClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_public

    @property
    def meeting_buddy_settings(self):
        if self._meeting_buddy_settings is None:
            from .meeting_buddy_settings.client import AsyncMeetingBuddySettingsClient  # noqa: E402

            self._meeting_buddy_settings = AsyncMeetingBuddySettingsClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_settings

    @property
    def meeting_buddy_voice_agent(self):
        if self._meeting_buddy_voice_agent is None:
            from .meeting_buddy_voice_agent.client import AsyncMeetingBuddyVoiceAgentClient  # noqa: E402

            self._meeting_buddy_voice_agent = AsyncMeetingBuddyVoiceAgentClient(client_wrapper=self._client_wrapper)
        return self._meeting_buddy_voice_agent

    @property
    def audio(self):
        if self._audio is None:
            from .audio.client import AsyncAudioClient  # noqa: E402

            self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper)
        return self._audio

    @property
    def audio_services(self):
        if self._audio_services is None:
            from .audio_services.client import AsyncAudioServicesClient  # noqa: E402

            self._audio_services = AsyncAudioServicesClient(client_wrapper=self._client_wrapper)
        return self._audio_services


def _get_base_url(*, base_url: typing.Optional[str] = None, environment: AitronosEnvironment) -> str:
    if base_url is not None:
        return base_url
    elif environment is not None:
        return environment.value
    else:
        raise Exception("Please pass in either base_url or environment to construct the client")
