# coding: utf-8

"""
    Slack Web API

    One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.

    The version of the OpenAPI document: 1.7.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Optional, Union
from typing_extensions import Annotated
from slack_beta_ti.models.conversations_archive_success_schema import ConversationsArchiveSuccessSchema
from slack_beta_ti.models.conversations_close_success_schema import ConversationsCloseSuccessSchema
from slack_beta_ti.models.conversations_create_success_schema import ConversationsCreateSuccessSchema
from slack_beta_ti.models.conversations_history_success_schema import ConversationsHistorySuccessSchema
from slack_beta_ti.models.conversations_info_success_schema import ConversationsInfoSuccessSchema
from slack_beta_ti.models.conversations_invite_error_schema import ConversationsInviteErrorSchema
from slack_beta_ti.models.conversations_join_success_schema import ConversationsJoinSuccessSchema
from slack_beta_ti.models.conversations_kick_success_schema import ConversationsKickSuccessSchema
from slack_beta_ti.models.conversations_leave_success_schema import ConversationsLeaveSuccessSchema
from slack_beta_ti.models.conversations_list_success_schema import ConversationsListSuccessSchema
from slack_beta_ti.models.conversations_mark_success_schema import ConversationsMarkSuccessSchema
from slack_beta_ti.models.conversations_members_success_schema import ConversationsMembersSuccessSchema
from slack_beta_ti.models.conversations_open_success_schema import ConversationsOpenSuccessSchema
from slack_beta_ti.models.conversations_rename_success_schema import ConversationsRenameSuccessSchema
from slack_beta_ti.models.conversations_replies_success_schema import ConversationsRepliesSuccessSchema
from slack_beta_ti.models.conversations_set_purpose_success_schema import ConversationsSetPurposeSuccessSchema
from slack_beta_ti.models.conversations_set_topic_success_schema import ConversationsSetTopicSuccessSchema
from slack_beta_ti.models.conversations_unarchive_success_schema import ConversationsUnarchiveSuccessSchema

from slack_beta_ti.api_client import ApiClient, RequestSerialized
from slack_beta_ti.api_response import ApiResponse
from slack_beta_ti.rest import RESTResponseType


class ConversationsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def conversations_archive(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to archive")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsArchiveSuccessSchema:
        """conversations_archive

        Archives a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to archive
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_archive_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsArchiveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_archive_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to archive")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsArchiveSuccessSchema]:
        """conversations_archive

        Archives a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to archive
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_archive_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsArchiveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_archive_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to archive")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_archive

        Archives a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to archive
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_archive_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsArchiveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_archive_serialize(
        self,
        token,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.archive',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_close(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to close.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsCloseSuccessSchema:
        """conversations_close

        Closes a direct message or multi-person direct message.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to close.
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_close_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsCloseSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_close_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to close.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsCloseSuccessSchema]:
        """conversations_close

        Closes a direct message or multi-person direct message.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to close.
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_close_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsCloseSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_close_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to close.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_close

        Closes a direct message or multi-person direct message.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to close.
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_close_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsCloseSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_close_serialize(
        self,
        token,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.close',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_create(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        name: Annotated[Optional[StrictStr], Field(description="Name of the public or private channel to create")] = None,
        is_private: Annotated[Optional[StrictBool], Field(description="Create a private channel instead of a public one")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsCreateSuccessSchema:
        """conversations_create

        Initiates a public or private channel-based conversation

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param name: Name of the public or private channel to create
        :type name: str
        :param is_private: Create a private channel instead of a public one
        :type is_private: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_create_serialize(
            token=token,
            name=name,
            is_private=is_private,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsCreateSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_create_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        name: Annotated[Optional[StrictStr], Field(description="Name of the public or private channel to create")] = None,
        is_private: Annotated[Optional[StrictBool], Field(description="Create a private channel instead of a public one")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsCreateSuccessSchema]:
        """conversations_create

        Initiates a public or private channel-based conversation

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param name: Name of the public or private channel to create
        :type name: str
        :param is_private: Create a private channel instead of a public one
        :type is_private: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_create_serialize(
            token=token,
            name=name,
            is_private=is_private,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsCreateSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_create_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        name: Annotated[Optional[StrictStr], Field(description="Name of the public or private channel to create")] = None,
        is_private: Annotated[Optional[StrictBool], Field(description="Create a private channel instead of a public one")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_create

        Initiates a public or private channel-based conversation

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param name: Name of the public or private channel to create
        :type name: str
        :param is_private: Create a private channel instead of a public one
        :type is_private: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_create_serialize(
            token=token,
            name=name,
            is_private=is_private,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsCreateSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_create_serialize(
        self,
        token,
        name,
        is_private,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if name is not None:
            _form_params.append(('name', name))
        if is_private is not None:
            _form_params.append(('is_private', is_private))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.create',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_history(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:history`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to fetch history for.")] = None,
        latest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="End of time range of messages to include in results.")] = None,
        oldest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Start of time range of messages to include in results.")] = None,
        inclusive: Annotated[Optional[StrictBool], Field(description="Include messages with latest or oldest timestamp in results only when either timestamp is specified.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsHistorySuccessSchema:
        """conversations_history

        Fetches a conversation's history of messages and events.

        :param token: Authentication token. Requires scope: `conversations:history`
        :type token: str
        :param channel: Conversation ID to fetch history for.
        :type channel: str
        :param latest: End of time range of messages to include in results.
        :type latest: float
        :param oldest: Start of time range of messages to include in results.
        :type oldest: float
        :param inclusive: Include messages with latest or oldest timestamp in results only when either timestamp is specified.
        :type inclusive: bool
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_history_serialize(
            token=token,
            channel=channel,
            latest=latest,
            oldest=oldest,
            inclusive=inclusive,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsHistorySuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_history_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:history`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to fetch history for.")] = None,
        latest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="End of time range of messages to include in results.")] = None,
        oldest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Start of time range of messages to include in results.")] = None,
        inclusive: Annotated[Optional[StrictBool], Field(description="Include messages with latest or oldest timestamp in results only when either timestamp is specified.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsHistorySuccessSchema]:
        """conversations_history

        Fetches a conversation's history of messages and events.

        :param token: Authentication token. Requires scope: `conversations:history`
        :type token: str
        :param channel: Conversation ID to fetch history for.
        :type channel: str
        :param latest: End of time range of messages to include in results.
        :type latest: float
        :param oldest: Start of time range of messages to include in results.
        :type oldest: float
        :param inclusive: Include messages with latest or oldest timestamp in results only when either timestamp is specified.
        :type inclusive: bool
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_history_serialize(
            token=token,
            channel=channel,
            latest=latest,
            oldest=oldest,
            inclusive=inclusive,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsHistorySuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_history_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:history`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to fetch history for.")] = None,
        latest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="End of time range of messages to include in results.")] = None,
        oldest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Start of time range of messages to include in results.")] = None,
        inclusive: Annotated[Optional[StrictBool], Field(description="Include messages with latest or oldest timestamp in results only when either timestamp is specified.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_history

        Fetches a conversation's history of messages and events.

        :param token: Authentication token. Requires scope: `conversations:history`
        :type token: str
        :param channel: Conversation ID to fetch history for.
        :type channel: str
        :param latest: End of time range of messages to include in results.
        :type latest: float
        :param oldest: Start of time range of messages to include in results.
        :type oldest: float
        :param inclusive: Include messages with latest or oldest timestamp in results only when either timestamp is specified.
        :type inclusive: bool
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_history_serialize(
            token=token,
            channel=channel,
            latest=latest,
            oldest=oldest,
            inclusive=inclusive,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsHistorySuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_history_serialize(
        self,
        token,
        channel,
        latest,
        oldest,
        inclusive,
        limit,
        cursor,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if token is not None:
            
            _query_params.append(('token', token))
            
        if channel is not None:
            
            _query_params.append(('channel', channel))
            
        if latest is not None:
            
            _query_params.append(('latest', latest))
            
        if oldest is not None:
            
            _query_params.append(('oldest', oldest))
            
        if inclusive is not None:
            
            _query_params.append(('inclusive', inclusive))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/conversations.history',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to learn more about")] = None,
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for this conversation. Defaults to `false`")] = None,
        include_num_members: Annotated[Optional[StrictBool], Field(description="Set to `true` to include the member count for the specified conversation. Defaults to `false`")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsInfoSuccessSchema:
        """conversations_info

        Retrieve information about a conversation.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param channel: Conversation ID to learn more about
        :type channel: str
        :param include_locale: Set this to `true` to receive the locale for this conversation. Defaults to `false`
        :type include_locale: bool
        :param include_num_members: Set to `true` to include the member count for the specified conversation. Defaults to `false`
        :type include_num_members: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_info_serialize(
            token=token,
            channel=channel,
            include_locale=include_locale,
            include_num_members=include_num_members,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsInfoSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_info_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to learn more about")] = None,
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for this conversation. Defaults to `false`")] = None,
        include_num_members: Annotated[Optional[StrictBool], Field(description="Set to `true` to include the member count for the specified conversation. Defaults to `false`")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsInfoSuccessSchema]:
        """conversations_info

        Retrieve information about a conversation.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param channel: Conversation ID to learn more about
        :type channel: str
        :param include_locale: Set this to `true` to receive the locale for this conversation. Defaults to `false`
        :type include_locale: bool
        :param include_num_members: Set to `true` to include the member count for the specified conversation. Defaults to `false`
        :type include_num_members: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_info_serialize(
            token=token,
            channel=channel,
            include_locale=include_locale,
            include_num_members=include_num_members,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsInfoSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_info_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to learn more about")] = None,
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for this conversation. Defaults to `false`")] = None,
        include_num_members: Annotated[Optional[StrictBool], Field(description="Set to `true` to include the member count for the specified conversation. Defaults to `false`")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_info

        Retrieve information about a conversation.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param channel: Conversation ID to learn more about
        :type channel: str
        :param include_locale: Set this to `true` to receive the locale for this conversation. Defaults to `false`
        :type include_locale: bool
        :param include_num_members: Set to `true` to include the member count for the specified conversation. Defaults to `false`
        :type include_num_members: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_info_serialize(
            token=token,
            channel=channel,
            include_locale=include_locale,
            include_num_members=include_num_members,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsInfoSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_info_serialize(
        self,
        token,
        channel,
        include_locale,
        include_num_members,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if token is not None:
            
            _query_params.append(('token', token))
            
        if channel is not None:
            
            _query_params.append(('channel', channel))
            
        if include_locale is not None:
            
            _query_params.append(('include_locale', include_locale))
            
        if include_num_members is not None:
            
            _query_params.append(('include_num_members', include_num_members))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/conversations.info',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_invite(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="The ID of the public or private channel to invite user(s) to.")] = None,
        users: Annotated[Optional[StrictStr], Field(description="A comma separated list of user IDs. Up to 1000 users may be listed.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsInviteErrorSchema:
        """conversations_invite

        Invites users to a channel.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: The ID of the public or private channel to invite user(s) to.
        :type channel: str
        :param users: A comma separated list of user IDs. Up to 1000 users may be listed.
        :type users: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_invite_serialize(
            token=token,
            channel=channel,
            users=users,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsInviteErrorSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_invite_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="The ID of the public or private channel to invite user(s) to.")] = None,
        users: Annotated[Optional[StrictStr], Field(description="A comma separated list of user IDs. Up to 1000 users may be listed.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsInviteErrorSchema]:
        """conversations_invite

        Invites users to a channel.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: The ID of the public or private channel to invite user(s) to.
        :type channel: str
        :param users: A comma separated list of user IDs. Up to 1000 users may be listed.
        :type users: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_invite_serialize(
            token=token,
            channel=channel,
            users=users,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsInviteErrorSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_invite_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="The ID of the public or private channel to invite user(s) to.")] = None,
        users: Annotated[Optional[StrictStr], Field(description="A comma separated list of user IDs. Up to 1000 users may be listed.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_invite

        Invites users to a channel.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: The ID of the public or private channel to invite user(s) to.
        :type channel: str
        :param users: A comma separated list of user IDs. Up to 1000 users may be listed.
        :type users: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_invite_serialize(
            token=token,
            channel=channel,
            users=users,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsInviteErrorSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_invite_serialize(
        self,
        token,
        channel,
        users,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if users is not None:
            _form_params.append(('users', users))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.invite',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_join(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `channels:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to join")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsJoinSuccessSchema:
        """conversations_join

        Joins an existing conversation.

        :param token: Authentication token. Requires scope: `channels:write`
        :type token: str
        :param channel: ID of conversation to join
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_join_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsJoinSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_join_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `channels:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to join")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsJoinSuccessSchema]:
        """conversations_join

        Joins an existing conversation.

        :param token: Authentication token. Requires scope: `channels:write`
        :type token: str
        :param channel: ID of conversation to join
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_join_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsJoinSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_join_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `channels:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to join")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_join

        Joins an existing conversation.

        :param token: Authentication token. Requires scope: `channels:write`
        :type token: str
        :param channel: ID of conversation to join
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_join_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsJoinSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_join_serialize(
        self,
        token,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.join',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_kick(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to remove user from.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User ID to be removed.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsKickSuccessSchema:
        """conversations_kick

        Removes a user from a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to remove user from.
        :type channel: str
        :param user: User ID to be removed.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_kick_serialize(
            token=token,
            channel=channel,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsKickSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_kick_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to remove user from.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User ID to be removed.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsKickSuccessSchema]:
        """conversations_kick

        Removes a user from a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to remove user from.
        :type channel: str
        :param user: User ID to be removed.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_kick_serialize(
            token=token,
            channel=channel,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsKickSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_kick_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to remove user from.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User ID to be removed.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_kick

        Removes a user from a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to remove user from.
        :type channel: str
        :param user: User ID to be removed.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_kick_serialize(
            token=token,
            channel=channel,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsKickSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_kick_serialize(
        self,
        token,
        channel,
        user,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if user is not None:
            _form_params.append(('user', user))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.kick',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_leave(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to leave")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsLeaveSuccessSchema:
        """conversations_leave

        Leaves a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to leave
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_leave_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsLeaveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_leave_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to leave")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsLeaveSuccessSchema]:
        """conversations_leave

        Leaves a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to leave
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_leave_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsLeaveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_leave_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to leave")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_leave

        Leaves a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to leave
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_leave_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsLeaveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_leave_serialize(
        self,
        token,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.leave',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_list(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        exclude_archived: Annotated[Optional[StrictBool], Field(description="Set to `true` to exclude archived channels from the list")] = None,
        types: Annotated[Optional[StrictStr], Field(description="Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsListSuccessSchema:
        """conversations_list

        Lists all channels in a Slack team.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param exclude_archived: Set to `true` to exclude archived channels from the list
        :type exclude_archived: bool
        :param types: Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
        :type types: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_list_serialize(
            token=token,
            exclude_archived=exclude_archived,
            types=types,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsListSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_list_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        exclude_archived: Annotated[Optional[StrictBool], Field(description="Set to `true` to exclude archived channels from the list")] = None,
        types: Annotated[Optional[StrictStr], Field(description="Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsListSuccessSchema]:
        """conversations_list

        Lists all channels in a Slack team.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param exclude_archived: Set to `true` to exclude archived channels from the list
        :type exclude_archived: bool
        :param types: Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
        :type types: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_list_serialize(
            token=token,
            exclude_archived=exclude_archived,
            types=types,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsListSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_list_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        exclude_archived: Annotated[Optional[StrictBool], Field(description="Set to `true` to exclude archived channels from the list")] = None,
        types: Annotated[Optional[StrictStr], Field(description="Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_list

        Lists all channels in a Slack team.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param exclude_archived: Set to `true` to exclude archived channels from the list
        :type exclude_archived: bool
        :param types: Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
        :type types: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_list_serialize(
            token=token,
            exclude_archived=exclude_archived,
            types=types,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsListSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_list_serialize(
        self,
        token,
        exclude_archived,
        types,
        limit,
        cursor,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if token is not None:
            
            _query_params.append(('token', token))
            
        if exclude_archived is not None:
            
            _query_params.append(('exclude_archived', exclude_archived))
            
        if types is not None:
            
            _query_params.append(('types', types))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/conversations.list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_mark(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Channel or conversation to set the read cursor for.")] = None,
        ts: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Unique identifier of message you want marked as most recently seen in this conversation.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsMarkSuccessSchema:
        """conversations_mark

        Sets the read cursor in a channel.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Channel or conversation to set the read cursor for.
        :type channel: str
        :param ts: Unique identifier of message you want marked as most recently seen in this conversation.
        :type ts: float
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_mark_serialize(
            token=token,
            channel=channel,
            ts=ts,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsMarkSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_mark_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Channel or conversation to set the read cursor for.")] = None,
        ts: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Unique identifier of message you want marked as most recently seen in this conversation.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsMarkSuccessSchema]:
        """conversations_mark

        Sets the read cursor in a channel.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Channel or conversation to set the read cursor for.
        :type channel: str
        :param ts: Unique identifier of message you want marked as most recently seen in this conversation.
        :type ts: float
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_mark_serialize(
            token=token,
            channel=channel,
            ts=ts,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsMarkSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_mark_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Channel or conversation to set the read cursor for.")] = None,
        ts: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Unique identifier of message you want marked as most recently seen in this conversation.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_mark

        Sets the read cursor in a channel.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Channel or conversation to set the read cursor for.
        :type channel: str
        :param ts: Unique identifier of message you want marked as most recently seen in this conversation.
        :type ts: float
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_mark_serialize(
            token=token,
            channel=channel,
            ts=ts,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsMarkSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_mark_serialize(
        self,
        token,
        channel,
        ts,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if ts is not None:
            _form_params.append(('ts', ts))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.mark',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_members(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of the conversation to retrieve members for")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsMembersSuccessSchema:
        """conversations_members

        Retrieve members of a conversation.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param channel: ID of the conversation to retrieve members for
        :type channel: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_members_serialize(
            token=token,
            channel=channel,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsMembersSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_members_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of the conversation to retrieve members for")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsMembersSuccessSchema]:
        """conversations_members

        Retrieve members of a conversation.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param channel: ID of the conversation to retrieve members for
        :type channel: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_members_serialize(
            token=token,
            channel=channel,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsMembersSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_members_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of the conversation to retrieve members for")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_members

        Retrieve members of a conversation.

        :param token: Authentication token. Requires scope: `conversations:read`
        :type token: str
        :param channel: ID of the conversation to retrieve members for
        :type channel: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_members_serialize(
            token=token,
            channel=channel,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsMembersSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_members_serialize(
        self,
        token,
        channel,
        limit,
        cursor,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if token is not None:
            
            _query_params.append(('token', token))
            
        if channel is not None:
            
            _query_params.append(('channel', channel))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/conversations.members',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_open(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.")] = None,
        users: Annotated[Optional[StrictStr], Field(description="Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.")] = None,
        return_im: Annotated[Optional[StrictBool], Field(description="Boolean, indicates you want the full IM channel definition in the response.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsOpenSuccessSchema:
        """conversations_open

        Opens or resumes a direct message or multi-person direct message.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.
        :type channel: str
        :param users: Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.
        :type users: str
        :param return_im: Boolean, indicates you want the full IM channel definition in the response.
        :type return_im: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_open_serialize(
            token=token,
            channel=channel,
            users=users,
            return_im=return_im,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsOpenSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_open_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.")] = None,
        users: Annotated[Optional[StrictStr], Field(description="Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.")] = None,
        return_im: Annotated[Optional[StrictBool], Field(description="Boolean, indicates you want the full IM channel definition in the response.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsOpenSuccessSchema]:
        """conversations_open

        Opens or resumes a direct message or multi-person direct message.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.
        :type channel: str
        :param users: Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.
        :type users: str
        :param return_im: Boolean, indicates you want the full IM channel definition in the response.
        :type return_im: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_open_serialize(
            token=token,
            channel=channel,
            users=users,
            return_im=return_im,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsOpenSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_open_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.")] = None,
        users: Annotated[Optional[StrictStr], Field(description="Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.")] = None,
        return_im: Annotated[Optional[StrictBool], Field(description="Boolean, indicates you want the full IM channel definition in the response.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_open

        Opens or resumes a direct message or multi-person direct message.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.
        :type channel: str
        :param users: Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.
        :type users: str
        :param return_im: Boolean, indicates you want the full IM channel definition in the response.
        :type return_im: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_open_serialize(
            token=token,
            channel=channel,
            users=users,
            return_im=return_im,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsOpenSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_open_serialize(
        self,
        token,
        channel,
        users,
        return_im,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if users is not None:
            _form_params.append(('users', users))
        if return_im is not None:
            _form_params.append(('return_im', return_im))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.open',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_rename(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to rename")] = None,
        name: Annotated[Optional[StrictStr], Field(description="New name for conversation.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsRenameSuccessSchema:
        """conversations_rename

        Renames a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to rename
        :type channel: str
        :param name: New name for conversation.
        :type name: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_rename_serialize(
            token=token,
            channel=channel,
            name=name,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsRenameSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_rename_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to rename")] = None,
        name: Annotated[Optional[StrictStr], Field(description="New name for conversation.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsRenameSuccessSchema]:
        """conversations_rename

        Renames a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to rename
        :type channel: str
        :param name: New name for conversation.
        :type name: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_rename_serialize(
            token=token,
            channel=channel,
            name=name,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsRenameSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_rename_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to rename")] = None,
        name: Annotated[Optional[StrictStr], Field(description="New name for conversation.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_rename

        Renames a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to rename
        :type channel: str
        :param name: New name for conversation.
        :type name: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_rename_serialize(
            token=token,
            channel=channel,
            name=name,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsRenameSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_rename_serialize(
        self,
        token,
        channel,
        name,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if name is not None:
            _form_params.append(('name', name))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.rename',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_replies(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:history`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to fetch thread from.")] = None,
        ts: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.")] = None,
        latest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="End of time range of messages to include in results.")] = None,
        oldest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Start of time range of messages to include in results.")] = None,
        inclusive: Annotated[Optional[StrictBool], Field(description="Include messages with latest or oldest timestamp in results only when either timestamp is specified.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsRepliesSuccessSchema:
        """conversations_replies

        Retrieve a thread of messages posted to a conversation

        :param token: Authentication token. Requires scope: `conversations:history`
        :type token: str
        :param channel: Conversation ID to fetch thread from.
        :type channel: str
        :param ts: Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.
        :type ts: float
        :param latest: End of time range of messages to include in results.
        :type latest: float
        :param oldest: Start of time range of messages to include in results.
        :type oldest: float
        :param inclusive: Include messages with latest or oldest timestamp in results only when either timestamp is specified.
        :type inclusive: bool
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_replies_serialize(
            token=token,
            channel=channel,
            ts=ts,
            latest=latest,
            oldest=oldest,
            inclusive=inclusive,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsRepliesSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_replies_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:history`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to fetch thread from.")] = None,
        ts: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.")] = None,
        latest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="End of time range of messages to include in results.")] = None,
        oldest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Start of time range of messages to include in results.")] = None,
        inclusive: Annotated[Optional[StrictBool], Field(description="Include messages with latest or oldest timestamp in results only when either timestamp is specified.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsRepliesSuccessSchema]:
        """conversations_replies

        Retrieve a thread of messages posted to a conversation

        :param token: Authentication token. Requires scope: `conversations:history`
        :type token: str
        :param channel: Conversation ID to fetch thread from.
        :type channel: str
        :param ts: Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.
        :type ts: float
        :param latest: End of time range of messages to include in results.
        :type latest: float
        :param oldest: Start of time range of messages to include in results.
        :type oldest: float
        :param inclusive: Include messages with latest or oldest timestamp in results only when either timestamp is specified.
        :type inclusive: bool
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_replies_serialize(
            token=token,
            channel=channel,
            ts=ts,
            latest=latest,
            oldest=oldest,
            inclusive=inclusive,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsRepliesSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_replies_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:history`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation ID to fetch thread from.")] = None,
        ts: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.")] = None,
        latest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="End of time range of messages to include in results.")] = None,
        oldest: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Start of time range of messages to include in results.")] = None,
        inclusive: Annotated[Optional[StrictBool], Field(description="Include messages with latest or oldest timestamp in results only when either timestamp is specified.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_replies

        Retrieve a thread of messages posted to a conversation

        :param token: Authentication token. Requires scope: `conversations:history`
        :type token: str
        :param channel: Conversation ID to fetch thread from.
        :type channel: str
        :param ts: Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.
        :type ts: float
        :param latest: End of time range of messages to include in results.
        :type latest: float
        :param oldest: Start of time range of messages to include in results.
        :type oldest: float
        :param inclusive: Include messages with latest or oldest timestamp in results only when either timestamp is specified.
        :type inclusive: bool
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_replies_serialize(
            token=token,
            channel=channel,
            ts=ts,
            latest=latest,
            oldest=oldest,
            inclusive=inclusive,
            limit=limit,
            cursor=cursor,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsRepliesSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_replies_serialize(
        self,
        token,
        channel,
        ts,
        latest,
        oldest,
        inclusive,
        limit,
        cursor,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if token is not None:
            
            _query_params.append(('token', token))
            
        if channel is not None:
            
            _query_params.append(('channel', channel))
            
        if ts is not None:
            
            _query_params.append(('ts', ts))
            
        if latest is not None:
            
            _query_params.append(('latest', latest))
            
        if oldest is not None:
            
            _query_params.append(('oldest', oldest))
            
        if inclusive is not None:
            
            _query_params.append(('inclusive', inclusive))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/conversations.replies',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_set_purpose(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to set the purpose of")] = None,
        purpose: Annotated[Optional[StrictStr], Field(description="A new, specialer purpose")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsSetPurposeSuccessSchema:
        """conversations_set_purpose

        Sets the purpose for a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to set the purpose of
        :type channel: str
        :param purpose: A new, specialer purpose
        :type purpose: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_set_purpose_serialize(
            token=token,
            channel=channel,
            purpose=purpose,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsSetPurposeSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_set_purpose_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to set the purpose of")] = None,
        purpose: Annotated[Optional[StrictStr], Field(description="A new, specialer purpose")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsSetPurposeSuccessSchema]:
        """conversations_set_purpose

        Sets the purpose for a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to set the purpose of
        :type channel: str
        :param purpose: A new, specialer purpose
        :type purpose: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_set_purpose_serialize(
            token=token,
            channel=channel,
            purpose=purpose,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsSetPurposeSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_set_purpose_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to set the purpose of")] = None,
        purpose: Annotated[Optional[StrictStr], Field(description="A new, specialer purpose")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_set_purpose

        Sets the purpose for a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to set the purpose of
        :type channel: str
        :param purpose: A new, specialer purpose
        :type purpose: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_set_purpose_serialize(
            token=token,
            channel=channel,
            purpose=purpose,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsSetPurposeSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_set_purpose_serialize(
        self,
        token,
        channel,
        purpose,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if purpose is not None:
            _form_params.append(('purpose', purpose))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.setPurpose',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_set_topic(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to set the topic of")] = None,
        topic: Annotated[Optional[StrictStr], Field(description="The new topic string. Does not support formatting or linkification.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsSetTopicSuccessSchema:
        """conversations_set_topic

        Sets the topic for a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to set the topic of
        :type channel: str
        :param topic: The new topic string. Does not support formatting or linkification.
        :type topic: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_set_topic_serialize(
            token=token,
            channel=channel,
            topic=topic,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsSetTopicSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_set_topic_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to set the topic of")] = None,
        topic: Annotated[Optional[StrictStr], Field(description="The new topic string. Does not support formatting or linkification.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsSetTopicSuccessSchema]:
        """conversations_set_topic

        Sets the topic for a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to set the topic of
        :type channel: str
        :param topic: The new topic string. Does not support formatting or linkification.
        :type topic: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_set_topic_serialize(
            token=token,
            channel=channel,
            topic=topic,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsSetTopicSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_set_topic_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="Conversation to set the topic of")] = None,
        topic: Annotated[Optional[StrictStr], Field(description="The new topic string. Does not support formatting or linkification.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_set_topic

        Sets the topic for a conversation.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: Conversation to set the topic of
        :type channel: str
        :param topic: The new topic string. Does not support formatting or linkification.
        :type topic: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_set_topic_serialize(
            token=token,
            channel=channel,
            topic=topic,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsSetTopicSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_set_topic_serialize(
        self,
        token,
        channel,
        topic,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        if topic is not None:
            _form_params.append(('topic', topic))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.setTopic',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def conversations_unarchive(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to unarchive")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ConversationsUnarchiveSuccessSchema:
        """conversations_unarchive

        Reverses conversation archival.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to unarchive
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_unarchive_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsUnarchiveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def conversations_unarchive_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to unarchive")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ConversationsUnarchiveSuccessSchema]:
        """conversations_unarchive

        Reverses conversation archival.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to unarchive
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_unarchive_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsUnarchiveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def conversations_unarchive_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:write`")] = None,
        channel: Annotated[Optional[StrictStr], Field(description="ID of conversation to unarchive")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """conversations_unarchive

        Reverses conversation archival.

        :param token: Authentication token. Requires scope: `conversations:write`
        :type token: str
        :param channel: ID of conversation to unarchive
        :type channel: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._conversations_unarchive_serialize(
            token=token,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ConversationsUnarchiveSuccessSchema",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _conversations_unarchive_serialize(
        self,
        token,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # process the form parameters
        if channel is not None:
            _form_params.append(('channel', channel))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded', 
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'slackAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/conversations.unarchive',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )


