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

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.auto_join_rule_list_response import AutoJoinRuleListResponse
from ..types.auto_join_rule_response import AutoJoinRuleResponse
from ..types.join_all_toggle_response import JoinAllToggleResponse
from .raw_client import AsyncRawMeetingBuddyAutoJoinClient, RawMeetingBuddyAutoJoinClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class MeetingBuddyAutoJoinClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawMeetingBuddyAutoJoinClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawMeetingBuddyAutoJoinClient
        """
        return self._raw_client

    def get_join_all_status(self, *, request_options: typing.Optional[RequestOptions] = None) -> JoinAllToggleResponse:
        """
        Check whether auto-join-all is enabled for the authenticated user.

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

        Returns
        -------
        JoinAllToggleResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.get_join_all_status()
        """
        _response = self._raw_client.get_join_all_status(request_options=request_options)
        return _response.data

    def toggle_join_all_meetings(
        self,
        *,
        enabled: bool,
        bot_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> JoinAllToggleResponse:
        """
        Enable or disable auto-joining every meeting with a meeting link.

        When enabled, creates a catch-all rule that matches all calendar events.
        When disabled, disables (but preserves) the catch-all rule.
        Other custom rules (never-join, keyword, organizer) still take precedence
        via priority ordering.

        Parameters
        ----------
        enabled : bool
            Whether to automatically join all meetings

        bot_name : typing.Optional[str]

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

        Returns
        -------
        JoinAllToggleResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.toggle_join_all_meetings(
            enabled=True,
        )
        """
        _response = self._raw_client.toggle_join_all_meetings(
            enabled=enabled, bot_name=bot_name, request_options=request_options
        )
        return _response.data

    def list_auto_join_rules(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AutoJoinRuleListResponse:
        """
        List all auto-join rules for the authenticated user.

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

        Returns
        -------
        AutoJoinRuleListResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.list_auto_join_rules()
        """
        _response = self._raw_client.list_auto_join_rules(request_options=request_options)
        return _response.data

    def create_auto_join_rule(
        self,
        *,
        name: str,
        calendar_provider: typing.Optional[str] = OMIT,
        match_mode: typing.Optional[str] = OMIT,
        keywords: typing.Optional[typing.Sequence[str]] = OMIT,
        organizer_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        exclude_patterns: typing.Optional[typing.Sequence[str]] = OMIT,
        min_attendees: typing.Optional[int] = OMIT,
        max_attendees: typing.Optional[int] = OMIT,
        time_window_start: typing.Optional[str] = OMIT,
        time_window_end: typing.Optional[str] = OMIT,
        days_of_week: typing.Optional[typing.Sequence[int]] = OMIT,
        timezone: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        priority: typing.Optional[int] = OMIT,
        destination_vector_store_id: typing.Optional[str] = OMIT,
        auto_add_to_vector_store: typing.Optional[bool] = OMIT,
        participation_mode: typing.Optional[str] = OMIT,
        voice_profile_id: typing.Optional[str] = OMIT,
        auto_share_mode: typing.Optional[str] = OMIT,
        auto_share_department_ids: typing.Optional[typing.Sequence[str]] = OMIT,
        attendee_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        assistant_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AutoJoinRuleResponse:
        """
        Create a new auto-join rule.

        Parameters
        ----------
        name : str

        calendar_provider : typing.Optional[str]

        match_mode : typing.Optional[str]

        keywords : typing.Optional[typing.Sequence[str]]

        organizer_emails : typing.Optional[typing.Sequence[str]]

        exclude_patterns : typing.Optional[typing.Sequence[str]]

        min_attendees : typing.Optional[int]

        max_attendees : typing.Optional[int]

        time_window_start : typing.Optional[str]

        time_window_end : typing.Optional[str]

        days_of_week : typing.Optional[typing.Sequence[int]]

        timezone : typing.Optional[str]

        bot_name : typing.Optional[str]

        priority : typing.Optional[int]

        destination_vector_store_id : typing.Optional[str]
            Vector store to auto-route meeting data to

        auto_add_to_vector_store : typing.Optional[bool]
            Automatically add meeting data to vector store on completion

        participation_mode : typing.Optional[str]
            'listener' or 'participant'. Overrides org default for sessions triggered by this rule.

        voice_profile_id : typing.Optional[str]
            Voice profile ID to use when participation_mode='participant'

        auto_share_mode : typing.Optional[str]
            Default visibility for sessions created by this rule: private, participants, department, organization

        auto_share_department_ids : typing.Optional[typing.Sequence[str]]
            Department IDs for department-level sharing on auto-created sessions

        attendee_emails : typing.Optional[typing.Sequence[str]]
            Trigger this rule when any of these emails are event attendees

        assistant_id : typing.Optional[str]
            Use this assistant's identity (name, voice, instructions) for sessions created by this rule

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

        Returns
        -------
        AutoJoinRuleResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.create_auto_join_rule(
            name="name",
        )
        """
        _response = self._raw_client.create_auto_join_rule(
            name=name,
            calendar_provider=calendar_provider,
            match_mode=match_mode,
            keywords=keywords,
            organizer_emails=organizer_emails,
            exclude_patterns=exclude_patterns,
            min_attendees=min_attendees,
            max_attendees=max_attendees,
            time_window_start=time_window_start,
            time_window_end=time_window_end,
            days_of_week=days_of_week,
            timezone=timezone,
            bot_name=bot_name,
            priority=priority,
            destination_vector_store_id=destination_vector_store_id,
            auto_add_to_vector_store=auto_add_to_vector_store,
            participation_mode=participation_mode,
            voice_profile_id=voice_profile_id,
            auto_share_mode=auto_share_mode,
            auto_share_department_ids=auto_share_department_ids,
            attendee_emails=attendee_emails,
            assistant_id=assistant_id,
            request_options=request_options,
        )
        return _response.data

    def delete_auto_join_rule(self, rule_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
        """
        Delete an auto-join rule.

        Parameters
        ----------
        rule_id : str

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

        Returns
        -------
        None

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.delete_auto_join_rule(
            rule_id="rule_id",
        )
        """
        _response = self._raw_client.delete_auto_join_rule(rule_id, request_options=request_options)
        return _response.data

    def update_auto_join_rule(
        self,
        rule_id: str,
        *,
        name: typing.Optional[str] = OMIT,
        is_enabled: typing.Optional[bool] = OMIT,
        calendar_provider: typing.Optional[str] = OMIT,
        match_mode: typing.Optional[str] = OMIT,
        keywords: typing.Optional[typing.Sequence[str]] = OMIT,
        organizer_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        exclude_patterns: typing.Optional[typing.Sequence[str]] = OMIT,
        min_attendees: typing.Optional[int] = OMIT,
        max_attendees: typing.Optional[int] = OMIT,
        time_window_start: typing.Optional[str] = OMIT,
        time_window_end: typing.Optional[str] = OMIT,
        days_of_week: typing.Optional[typing.Sequence[int]] = OMIT,
        timezone: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        priority: typing.Optional[int] = OMIT,
        destination_vector_store_id: typing.Optional[str] = OMIT,
        auto_add_to_vector_store: typing.Optional[bool] = OMIT,
        participation_mode: typing.Optional[str] = OMIT,
        voice_profile_id: typing.Optional[str] = OMIT,
        auto_share_mode: typing.Optional[str] = OMIT,
        auto_share_department_ids: typing.Optional[typing.Sequence[str]] = OMIT,
        attendee_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        assistant_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AutoJoinRuleResponse:
        """
        Update an existing auto-join rule.

        Parameters
        ----------
        rule_id : str

        name : typing.Optional[str]

        is_enabled : typing.Optional[bool]

        calendar_provider : typing.Optional[str]

        match_mode : typing.Optional[str]

        keywords : typing.Optional[typing.Sequence[str]]

        organizer_emails : typing.Optional[typing.Sequence[str]]

        exclude_patterns : typing.Optional[typing.Sequence[str]]

        min_attendees : typing.Optional[int]

        max_attendees : typing.Optional[int]

        time_window_start : typing.Optional[str]

        time_window_end : typing.Optional[str]

        days_of_week : typing.Optional[typing.Sequence[int]]

        timezone : typing.Optional[str]

        bot_name : typing.Optional[str]

        priority : typing.Optional[int]

        destination_vector_store_id : typing.Optional[str]

        auto_add_to_vector_store : typing.Optional[bool]

        participation_mode : typing.Optional[str]
            'listener' or 'participant'. Overrides org default for sessions triggered by this rule.

        voice_profile_id : typing.Optional[str]
            Voice profile ID to use when participation_mode='participant'

        auto_share_mode : typing.Optional[str]
            Default visibility for sessions created by this rule

        auto_share_department_ids : typing.Optional[typing.Sequence[str]]

        attendee_emails : typing.Optional[typing.Sequence[str]]

        assistant_id : typing.Optional[str]

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

        Returns
        -------
        AutoJoinRuleResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.update_auto_join_rule(
            rule_id="rule_id",
        )
        """
        _response = self._raw_client.update_auto_join_rule(
            rule_id,
            name=name,
            is_enabled=is_enabled,
            calendar_provider=calendar_provider,
            match_mode=match_mode,
            keywords=keywords,
            organizer_emails=organizer_emails,
            exclude_patterns=exclude_patterns,
            min_attendees=min_attendees,
            max_attendees=max_attendees,
            time_window_start=time_window_start,
            time_window_end=time_window_end,
            days_of_week=days_of_week,
            timezone=timezone,
            bot_name=bot_name,
            priority=priority,
            destination_vector_store_id=destination_vector_store_id,
            auto_add_to_vector_store=auto_add_to_vector_store,
            participation_mode=participation_mode,
            voice_profile_id=voice_profile_id,
            auto_share_mode=auto_share_mode,
            auto_share_department_ids=auto_share_department_ids,
            attendee_emails=attendee_emails,
            assistant_id=assistant_id,
            request_options=request_options,
        )
        return _response.data

    def create_auto_join_rule_from_event(
        self,
        *,
        event_id: str,
        action: str,
        match_by: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AutoJoinRuleResponse:
        """
        Create an auto-join rule based on a calendar event's properties.

        Use action='always_join' to always join similar meetings,
        or action='never_join' to never join similar meetings.

        Parameters
        ----------
        event_id : str
            Calendar event to base the rule on

        action : str
            Whether to always or never join meetings like this

        match_by : typing.Optional[str]
            Match by organizer email or title keywords

        bot_name : typing.Optional[str]

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

        Returns
        -------
        AutoJoinRuleResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_auto_join.create_auto_join_rule_from_event(
            event_id="event_id",
            action="action",
        )
        """
        _response = self._raw_client.create_auto_join_rule_from_event(
            event_id=event_id, action=action, match_by=match_by, bot_name=bot_name, request_options=request_options
        )
        return _response.data


class AsyncMeetingBuddyAutoJoinClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawMeetingBuddyAutoJoinClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawMeetingBuddyAutoJoinClient
        """
        return self._raw_client

    async def get_join_all_status(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> JoinAllToggleResponse:
        """
        Check whether auto-join-all is enabled for the authenticated user.

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

        Returns
        -------
        JoinAllToggleResponse
            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.meeting_buddy_auto_join.get_join_all_status()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_join_all_status(request_options=request_options)
        return _response.data

    async def toggle_join_all_meetings(
        self,
        *,
        enabled: bool,
        bot_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> JoinAllToggleResponse:
        """
        Enable or disable auto-joining every meeting with a meeting link.

        When enabled, creates a catch-all rule that matches all calendar events.
        When disabled, disables (but preserves) the catch-all rule.
        Other custom rules (never-join, keyword, organizer) still take precedence
        via priority ordering.

        Parameters
        ----------
        enabled : bool
            Whether to automatically join all meetings

        bot_name : typing.Optional[str]

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

        Returns
        -------
        JoinAllToggleResponse
            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.meeting_buddy_auto_join.toggle_join_all_meetings(
                enabled=True,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.toggle_join_all_meetings(
            enabled=enabled, bot_name=bot_name, request_options=request_options
        )
        return _response.data

    async def list_auto_join_rules(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AutoJoinRuleListResponse:
        """
        List all auto-join rules for the authenticated user.

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

        Returns
        -------
        AutoJoinRuleListResponse
            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.meeting_buddy_auto_join.list_auto_join_rules()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_auto_join_rules(request_options=request_options)
        return _response.data

    async def create_auto_join_rule(
        self,
        *,
        name: str,
        calendar_provider: typing.Optional[str] = OMIT,
        match_mode: typing.Optional[str] = OMIT,
        keywords: typing.Optional[typing.Sequence[str]] = OMIT,
        organizer_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        exclude_patterns: typing.Optional[typing.Sequence[str]] = OMIT,
        min_attendees: typing.Optional[int] = OMIT,
        max_attendees: typing.Optional[int] = OMIT,
        time_window_start: typing.Optional[str] = OMIT,
        time_window_end: typing.Optional[str] = OMIT,
        days_of_week: typing.Optional[typing.Sequence[int]] = OMIT,
        timezone: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        priority: typing.Optional[int] = OMIT,
        destination_vector_store_id: typing.Optional[str] = OMIT,
        auto_add_to_vector_store: typing.Optional[bool] = OMIT,
        participation_mode: typing.Optional[str] = OMIT,
        voice_profile_id: typing.Optional[str] = OMIT,
        auto_share_mode: typing.Optional[str] = OMIT,
        auto_share_department_ids: typing.Optional[typing.Sequence[str]] = OMIT,
        attendee_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        assistant_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AutoJoinRuleResponse:
        """
        Create a new auto-join rule.

        Parameters
        ----------
        name : str

        calendar_provider : typing.Optional[str]

        match_mode : typing.Optional[str]

        keywords : typing.Optional[typing.Sequence[str]]

        organizer_emails : typing.Optional[typing.Sequence[str]]

        exclude_patterns : typing.Optional[typing.Sequence[str]]

        min_attendees : typing.Optional[int]

        max_attendees : typing.Optional[int]

        time_window_start : typing.Optional[str]

        time_window_end : typing.Optional[str]

        days_of_week : typing.Optional[typing.Sequence[int]]

        timezone : typing.Optional[str]

        bot_name : typing.Optional[str]

        priority : typing.Optional[int]

        destination_vector_store_id : typing.Optional[str]
            Vector store to auto-route meeting data to

        auto_add_to_vector_store : typing.Optional[bool]
            Automatically add meeting data to vector store on completion

        participation_mode : typing.Optional[str]
            'listener' or 'participant'. Overrides org default for sessions triggered by this rule.

        voice_profile_id : typing.Optional[str]
            Voice profile ID to use when participation_mode='participant'

        auto_share_mode : typing.Optional[str]
            Default visibility for sessions created by this rule: private, participants, department, organization

        auto_share_department_ids : typing.Optional[typing.Sequence[str]]
            Department IDs for department-level sharing on auto-created sessions

        attendee_emails : typing.Optional[typing.Sequence[str]]
            Trigger this rule when any of these emails are event attendees

        assistant_id : typing.Optional[str]
            Use this assistant's identity (name, voice, instructions) for sessions created by this rule

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

        Returns
        -------
        AutoJoinRuleResponse
            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.meeting_buddy_auto_join.create_auto_join_rule(
                name="name",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_auto_join_rule(
            name=name,
            calendar_provider=calendar_provider,
            match_mode=match_mode,
            keywords=keywords,
            organizer_emails=organizer_emails,
            exclude_patterns=exclude_patterns,
            min_attendees=min_attendees,
            max_attendees=max_attendees,
            time_window_start=time_window_start,
            time_window_end=time_window_end,
            days_of_week=days_of_week,
            timezone=timezone,
            bot_name=bot_name,
            priority=priority,
            destination_vector_store_id=destination_vector_store_id,
            auto_add_to_vector_store=auto_add_to_vector_store,
            participation_mode=participation_mode,
            voice_profile_id=voice_profile_id,
            auto_share_mode=auto_share_mode,
            auto_share_department_ids=auto_share_department_ids,
            attendee_emails=attendee_emails,
            assistant_id=assistant_id,
            request_options=request_options,
        )
        return _response.data

    async def delete_auto_join_rule(
        self, rule_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Delete an auto-join rule.

        Parameters
        ----------
        rule_id : str

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

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


        async def main() -> None:
            await client.meeting_buddy_auto_join.delete_auto_join_rule(
                rule_id="rule_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete_auto_join_rule(rule_id, request_options=request_options)
        return _response.data

    async def update_auto_join_rule(
        self,
        rule_id: str,
        *,
        name: typing.Optional[str] = OMIT,
        is_enabled: typing.Optional[bool] = OMIT,
        calendar_provider: typing.Optional[str] = OMIT,
        match_mode: typing.Optional[str] = OMIT,
        keywords: typing.Optional[typing.Sequence[str]] = OMIT,
        organizer_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        exclude_patterns: typing.Optional[typing.Sequence[str]] = OMIT,
        min_attendees: typing.Optional[int] = OMIT,
        max_attendees: typing.Optional[int] = OMIT,
        time_window_start: typing.Optional[str] = OMIT,
        time_window_end: typing.Optional[str] = OMIT,
        days_of_week: typing.Optional[typing.Sequence[int]] = OMIT,
        timezone: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        priority: typing.Optional[int] = OMIT,
        destination_vector_store_id: typing.Optional[str] = OMIT,
        auto_add_to_vector_store: typing.Optional[bool] = OMIT,
        participation_mode: typing.Optional[str] = OMIT,
        voice_profile_id: typing.Optional[str] = OMIT,
        auto_share_mode: typing.Optional[str] = OMIT,
        auto_share_department_ids: typing.Optional[typing.Sequence[str]] = OMIT,
        attendee_emails: typing.Optional[typing.Sequence[str]] = OMIT,
        assistant_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AutoJoinRuleResponse:
        """
        Update an existing auto-join rule.

        Parameters
        ----------
        rule_id : str

        name : typing.Optional[str]

        is_enabled : typing.Optional[bool]

        calendar_provider : typing.Optional[str]

        match_mode : typing.Optional[str]

        keywords : typing.Optional[typing.Sequence[str]]

        organizer_emails : typing.Optional[typing.Sequence[str]]

        exclude_patterns : typing.Optional[typing.Sequence[str]]

        min_attendees : typing.Optional[int]

        max_attendees : typing.Optional[int]

        time_window_start : typing.Optional[str]

        time_window_end : typing.Optional[str]

        days_of_week : typing.Optional[typing.Sequence[int]]

        timezone : typing.Optional[str]

        bot_name : typing.Optional[str]

        priority : typing.Optional[int]

        destination_vector_store_id : typing.Optional[str]

        auto_add_to_vector_store : typing.Optional[bool]

        participation_mode : typing.Optional[str]
            'listener' or 'participant'. Overrides org default for sessions triggered by this rule.

        voice_profile_id : typing.Optional[str]
            Voice profile ID to use when participation_mode='participant'

        auto_share_mode : typing.Optional[str]
            Default visibility for sessions created by this rule

        auto_share_department_ids : typing.Optional[typing.Sequence[str]]

        attendee_emails : typing.Optional[typing.Sequence[str]]

        assistant_id : typing.Optional[str]

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

        Returns
        -------
        AutoJoinRuleResponse
            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.meeting_buddy_auto_join.update_auto_join_rule(
                rule_id="rule_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update_auto_join_rule(
            rule_id,
            name=name,
            is_enabled=is_enabled,
            calendar_provider=calendar_provider,
            match_mode=match_mode,
            keywords=keywords,
            organizer_emails=organizer_emails,
            exclude_patterns=exclude_patterns,
            min_attendees=min_attendees,
            max_attendees=max_attendees,
            time_window_start=time_window_start,
            time_window_end=time_window_end,
            days_of_week=days_of_week,
            timezone=timezone,
            bot_name=bot_name,
            priority=priority,
            destination_vector_store_id=destination_vector_store_id,
            auto_add_to_vector_store=auto_add_to_vector_store,
            participation_mode=participation_mode,
            voice_profile_id=voice_profile_id,
            auto_share_mode=auto_share_mode,
            auto_share_department_ids=auto_share_department_ids,
            attendee_emails=attendee_emails,
            assistant_id=assistant_id,
            request_options=request_options,
        )
        return _response.data

    async def create_auto_join_rule_from_event(
        self,
        *,
        event_id: str,
        action: str,
        match_by: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AutoJoinRuleResponse:
        """
        Create an auto-join rule based on a calendar event's properties.

        Use action='always_join' to always join similar meetings,
        or action='never_join' to never join similar meetings.

        Parameters
        ----------
        event_id : str
            Calendar event to base the rule on

        action : str
            Whether to always or never join meetings like this

        match_by : typing.Optional[str]
            Match by organizer email or title keywords

        bot_name : typing.Optional[str]

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

        Returns
        -------
        AutoJoinRuleResponse
            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.meeting_buddy_auto_join.create_auto_join_rule_from_event(
                event_id="event_id",
                action="action",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_auto_join_rule_from_event(
            event_id=event_id, action=action, match_by=match_by, bot_name=bot_name, request_options=request_options
        )
        return _response.data
