# 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, StrictInt, StrictStr
from typing import Optional
from typing_extensions import Annotated
from slack_beta_ti.models.admin_conversations_archive_schema import AdminConversationsArchiveSchema
from slack_beta_ti.models.admin_conversations_convert_to_private_schema import AdminConversationsConvertToPrivateSchema
from slack_beta_ti.models.admin_conversations_create_schema import AdminConversationsCreateSchema
from slack_beta_ti.models.admin_conversations_delete_schema import AdminConversationsDeleteSchema
from slack_beta_ti.models.admin_conversations_get_conversation_prefs_schema import AdminConversationsGetConversationPrefsSchema
from slack_beta_ti.models.admin_conversations_get_teams_schema import AdminConversationsGetTeamsSchema
from slack_beta_ti.models.admin_conversations_invite_schema import AdminConversationsInviteSchema
from slack_beta_ti.models.admin_conversations_rename_schema import AdminConversationsRenameSchema
from slack_beta_ti.models.admin_conversations_rename_schema1 import AdminConversationsRenameSchema1
from slack_beta_ti.models.admin_conversations_search_schema import AdminConversationsSearchSchema
from slack_beta_ti.models.admin_conversations_set_conversation_prefs_schema import AdminConversationsSetConversationPrefsSchema
from slack_beta_ti.models.admin_conversations_unarchive_schema import AdminConversationsUnarchiveSchema
from slack_beta_ti.models.default_success_template import DefaultSuccessTemplate

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 AdminConversationsApi:
    """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 admin_conversations_archive(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to archive.")],
        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,
    ) -> AdminConversationsArchiveSchema:
        """admin_conversations_archive

        Archive a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to archive. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_archive_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsArchiveSchema",
        }
        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 admin_conversations_archive_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to archive.")],
        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[AdminConversationsArchiveSchema]:
        """admin_conversations_archive

        Archive a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to archive. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_archive_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsArchiveSchema",
        }
        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 admin_conversations_archive_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to archive.")],
        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:
        """admin_conversations_archive

        Archive a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to archive. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_archive_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_archive_serialize(
        self,
        token,
        channel_id,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        # 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='/admin.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 admin_conversations_convert_to_private(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to convert to private.")],
        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,
    ) -> AdminConversationsConvertToPrivateSchema:
        """admin_conversations_convert_to_private

        Convert a public channel to a private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to convert to private. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_convert_to_private_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsConvertToPrivateSchema",
        }
        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 admin_conversations_convert_to_private_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to convert to private.")],
        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[AdminConversationsConvertToPrivateSchema]:
        """admin_conversations_convert_to_private

        Convert a public channel to a private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to convert to private. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_convert_to_private_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsConvertToPrivateSchema",
        }
        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 admin_conversations_convert_to_private_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to convert to private.")],
        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:
        """admin_conversations_convert_to_private

        Convert a public channel to a private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to convert to private. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_convert_to_private_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_convert_to_private_serialize(
        self,
        token,
        channel_id,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        # 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='/admin.conversations.convertToPrivate',
            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 admin_conversations_create(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        name: Annotated[StrictStr, Field(description="Name of the public or private channel to create.")],
        is_private: Annotated[StrictBool, Field(description="When `true`, creates a private channel instead of a public channel")],
        description: Annotated[Optional[StrictStr], Field(description="Description of the public or private channel to create.")] = None,
        org_wide: Annotated[Optional[StrictBool], Field(description="When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel")] = None,
        team_id: Annotated[Optional[StrictStr], Field(description="The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.")] = 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,
    ) -> AdminConversationsCreateSchema:
        """admin_conversations_create

        Create a public or private channel-based conversation.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param name: Name of the public or private channel to create. (required)
        :type name: str
        :param is_private: When `true`, creates a private channel instead of a public channel (required)
        :type is_private: bool
        :param description: Description of the public or private channel to create.
        :type description: str
        :param org_wide: When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel
        :type org_wide: bool
        :param team_id: The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.
        :type team_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_create_serialize(
            token=token,
            name=name,
            is_private=is_private,
            description=description,
            org_wide=org_wide,
            team_id=team_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsCreateSchema",
        }
        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 admin_conversations_create_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        name: Annotated[StrictStr, Field(description="Name of the public or private channel to create.")],
        is_private: Annotated[StrictBool, Field(description="When `true`, creates a private channel instead of a public channel")],
        description: Annotated[Optional[StrictStr], Field(description="Description of the public or private channel to create.")] = None,
        org_wide: Annotated[Optional[StrictBool], Field(description="When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel")] = None,
        team_id: Annotated[Optional[StrictStr], Field(description="The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.")] = 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[AdminConversationsCreateSchema]:
        """admin_conversations_create

        Create a public or private channel-based conversation.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param name: Name of the public or private channel to create. (required)
        :type name: str
        :param is_private: When `true`, creates a private channel instead of a public channel (required)
        :type is_private: bool
        :param description: Description of the public or private channel to create.
        :type description: str
        :param org_wide: When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel
        :type org_wide: bool
        :param team_id: The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.
        :type team_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_create_serialize(
            token=token,
            name=name,
            is_private=is_private,
            description=description,
            org_wide=org_wide,
            team_id=team_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsCreateSchema",
        }
        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 admin_conversations_create_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        name: Annotated[StrictStr, Field(description="Name of the public or private channel to create.")],
        is_private: Annotated[StrictBool, Field(description="When `true`, creates a private channel instead of a public channel")],
        description: Annotated[Optional[StrictStr], Field(description="Description of the public or private channel to create.")] = None,
        org_wide: Annotated[Optional[StrictBool], Field(description="When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel")] = None,
        team_id: Annotated[Optional[StrictStr], Field(description="The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.")] = 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:
        """admin_conversations_create

        Create a public or private channel-based conversation.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param name: Name of the public or private channel to create. (required)
        :type name: str
        :param is_private: When `true`, creates a private channel instead of a public channel (required)
        :type is_private: bool
        :param description: Description of the public or private channel to create.
        :type description: str
        :param org_wide: When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel
        :type org_wide: bool
        :param team_id: The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.
        :type team_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_create_serialize(
            token=token,
            name=name,
            is_private=is_private,
            description=description,
            org_wide=org_wide,
            team_id=team_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_create_serialize(
        self,
        token,
        name,
        is_private,
        description,
        org_wide,
        team_id,
        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 description is not None:
            _form_params.append(('description', description))
        if is_private is not None:
            _form_params.append(('is_private', is_private))
        if org_wide is not None:
            _form_params.append(('org_wide', org_wide))
        if team_id is not None:
            _form_params.append(('team_id', team_id))
        # 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='/admin.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 admin_conversations_delete(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to delete.")],
        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,
    ) -> AdminConversationsDeleteSchema:
        """admin_conversations_delete

        Delete a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to delete. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_delete_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsDeleteSchema",
        }
        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 admin_conversations_delete_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to delete.")],
        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[AdminConversationsDeleteSchema]:
        """admin_conversations_delete

        Delete a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to delete. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_delete_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsDeleteSchema",
        }
        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 admin_conversations_delete_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to delete.")],
        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:
        """admin_conversations_delete

        Delete a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to delete. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_delete_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_delete_serialize(
        self,
        token,
        channel_id,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        # 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='/admin.conversations.delete',
            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 admin_conversations_disconnect_shared(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to be disconnected from some workspaces.")],
        leaving_team_ids: Annotated[Optional[StrictStr], Field(description="The team to be removed from the channel. Currently only a single team id can be specified.")] = 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,
    ) -> AdminConversationsRenameSchema:
        """admin_conversations_disconnect_shared

        Disconnect a connected channel from one or more workspaces.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to be disconnected from some workspaces. (required)
        :type channel_id: str
        :param leaving_team_ids: The team to be removed from the channel. Currently only a single team id can be specified.
        :type leaving_team_ids: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_disconnect_shared_serialize(
            token=token,
            channel_id=channel_id,
            leaving_team_ids=leaving_team_ids,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsRenameSchema",
        }
        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 admin_conversations_disconnect_shared_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to be disconnected from some workspaces.")],
        leaving_team_ids: Annotated[Optional[StrictStr], Field(description="The team to be removed from the channel. Currently only a single team id can be specified.")] = 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[AdminConversationsRenameSchema]:
        """admin_conversations_disconnect_shared

        Disconnect a connected channel from one or more workspaces.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to be disconnected from some workspaces. (required)
        :type channel_id: str
        :param leaving_team_ids: The team to be removed from the channel. Currently only a single team id can be specified.
        :type leaving_team_ids: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_disconnect_shared_serialize(
            token=token,
            channel_id=channel_id,
            leaving_team_ids=leaving_team_ids,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsRenameSchema",
        }
        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 admin_conversations_disconnect_shared_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to be disconnected from some workspaces.")],
        leaving_team_ids: Annotated[Optional[StrictStr], Field(description="The team to be removed from the channel. Currently only a single team id can be specified.")] = 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:
        """admin_conversations_disconnect_shared

        Disconnect a connected channel from one or more workspaces.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to be disconnected from some workspaces. (required)
        :type channel_id: str
        :param leaving_team_ids: The team to be removed from the channel. Currently only a single team id can be specified.
        :type leaving_team_ids: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_disconnect_shared_serialize(
            token=token,
            channel_id=channel_id,
            leaving_team_ids=leaving_team_ids,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_disconnect_shared_serialize(
        self,
        token,
        channel_id,
        leaving_team_ids,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        if leaving_team_ids is not None:
            _form_params.append(('leaving_team_ids', leaving_team_ids))
        # 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='/admin.conversations.disconnectShared',
            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 admin_conversations_get_conversation_prefs(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to get preferences for.")],
        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,
    ) -> AdminConversationsGetConversationPrefsSchema:
        """admin_conversations_get_conversation_prefs

        Get conversation preferences for a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param channel_id: The channel to get preferences for. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_get_conversation_prefs_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsGetConversationPrefsSchema",
        }
        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 admin_conversations_get_conversation_prefs_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to get preferences for.")],
        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[AdminConversationsGetConversationPrefsSchema]:
        """admin_conversations_get_conversation_prefs

        Get conversation preferences for a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param channel_id: The channel to get preferences for. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_get_conversation_prefs_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsGetConversationPrefsSchema",
        }
        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 admin_conversations_get_conversation_prefs_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to get preferences for.")],
        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:
        """admin_conversations_get_conversation_prefs

        Get conversation preferences for a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param channel_id: The channel to get preferences for. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_get_conversation_prefs_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_get_conversation_prefs_serialize(
        self,
        token,
        channel_id,
        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 channel_id is not None:
            
            _query_params.append(('channel_id', channel_id))
            
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # 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='/admin.conversations.getConversationPrefs',
            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 admin_conversations_get_teams(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to determine connected workspaces within the organization for.")],
        cursor: Annotated[Optional[StrictStr], Field(description="Set `cursor` to `next_cursor` returned by the previous call to list items in the next page")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Must be between 1 - 1000 both inclusive.")] = 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,
    ) -> AdminConversationsGetTeamsSchema:
        """admin_conversations_get_teams

        Get all the workspaces a given public or private channel is connected to within this Enterprise org.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param channel_id: The channel to determine connected workspaces within the organization for. (required)
        :type channel_id: str
        :param cursor: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
        :type cursor: str
        :param limit: The maximum number of items to return. Must be between 1 - 1000 both inclusive.
        :type limit: int
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_get_teams_serialize(
            token=token,
            channel_id=channel_id,
            cursor=cursor,
            limit=limit,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsGetTeamsSchema",
        }
        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 admin_conversations_get_teams_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to determine connected workspaces within the organization for.")],
        cursor: Annotated[Optional[StrictStr], Field(description="Set `cursor` to `next_cursor` returned by the previous call to list items in the next page")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Must be between 1 - 1000 both inclusive.")] = 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[AdminConversationsGetTeamsSchema]:
        """admin_conversations_get_teams

        Get all the workspaces a given public or private channel is connected to within this Enterprise org.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param channel_id: The channel to determine connected workspaces within the organization for. (required)
        :type channel_id: str
        :param cursor: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
        :type cursor: str
        :param limit: The maximum number of items to return. Must be between 1 - 1000 both inclusive.
        :type limit: int
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_get_teams_serialize(
            token=token,
            channel_id=channel_id,
            cursor=cursor,
            limit=limit,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsGetTeamsSchema",
        }
        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 admin_conversations_get_teams_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to determine connected workspaces within the organization for.")],
        cursor: Annotated[Optional[StrictStr], Field(description="Set `cursor` to `next_cursor` returned by the previous call to list items in the next page")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Must be between 1 - 1000 both inclusive.")] = 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:
        """admin_conversations_get_teams

        Get all the workspaces a given public or private channel is connected to within this Enterprise org.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param channel_id: The channel to determine connected workspaces within the organization for. (required)
        :type channel_id: str
        :param cursor: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
        :type cursor: str
        :param limit: The maximum number of items to return. Must be between 1 - 1000 both inclusive.
        :type limit: int
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_get_teams_serialize(
            token=token,
            channel_id=channel_id,
            cursor=cursor,
            limit=limit,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_get_teams_serialize(
        self,
        token,
        channel_id,
        cursor,
        limit,
        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 channel_id is not None:
            
            _query_params.append(('channel_id', channel_id))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # 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='/admin.conversations.getTeams',
            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 admin_conversations_invite(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        user_ids: Annotated[StrictStr, Field(description="The users to invite.")],
        channel_id: Annotated[StrictStr, Field(description="The channel that the users will be invited to.")],
        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,
    ) -> AdminConversationsInviteSchema:
        """admin_conversations_invite

        Invite a user to a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param user_ids: The users to invite. (required)
        :type user_ids: str
        :param channel_id: The channel that the users will be invited to. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_invite_serialize(
            token=token,
            user_ids=user_ids,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsInviteSchema",
        }
        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 admin_conversations_invite_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        user_ids: Annotated[StrictStr, Field(description="The users to invite.")],
        channel_id: Annotated[StrictStr, Field(description="The channel that the users will be invited to.")],
        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[AdminConversationsInviteSchema]:
        """admin_conversations_invite

        Invite a user to a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param user_ids: The users to invite. (required)
        :type user_ids: str
        :param channel_id: The channel that the users will be invited to. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_invite_serialize(
            token=token,
            user_ids=user_ids,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsInviteSchema",
        }
        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 admin_conversations_invite_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        user_ids: Annotated[StrictStr, Field(description="The users to invite.")],
        channel_id: Annotated[StrictStr, Field(description="The channel that the users will be invited to.")],
        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:
        """admin_conversations_invite

        Invite a user to a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param user_ids: The users to invite. (required)
        :type user_ids: str
        :param channel_id: The channel that the users will be invited to. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_invite_serialize(
            token=token,
            user_ids=user_ids,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_invite_serialize(
        self,
        token,
        user_ids,
        channel_id,
        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 user_ids is not None:
            _form_params.append(('user_ids', user_ids))
        if channel_id is not None:
            _form_params.append(('channel_id', channel_id))
        # 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='/admin.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 admin_conversations_rename(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to rename.")],
        name: StrictStr,
        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,
    ) -> AdminConversationsRenameSchema1:
        """admin_conversations_rename

        Rename a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to rename. (required)
        :type channel_id: str
        :param name: (required)
        :type name: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_rename_serialize(
            token=token,
            channel_id=channel_id,
            name=name,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsRenameSchema1",
        }
        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 admin_conversations_rename_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to rename.")],
        name: StrictStr,
        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[AdminConversationsRenameSchema1]:
        """admin_conversations_rename

        Rename a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to rename. (required)
        :type channel_id: str
        :param name: (required)
        :type name: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_rename_serialize(
            token=token,
            channel_id=channel_id,
            name=name,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsRenameSchema1",
        }
        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 admin_conversations_rename_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to rename.")],
        name: StrictStr,
        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:
        """admin_conversations_rename

        Rename a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to rename. (required)
        :type channel_id: str
        :param name: (required)
        :type name: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_rename_serialize(
            token=token,
            channel_id=channel_id,
            name=name,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_rename_serialize(
        self,
        token,
        channel_id,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        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='/admin.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 admin_conversations_search(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        team_ids: Annotated[Optional[StrictStr], Field(description="Comma separated string of team IDs, signifying the workspaces to search through.")] = None,
        query: Annotated[Optional[StrictStr], Field(description="Name of the the channel to query by.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.")] = None,
        search_channel_types: Annotated[Optional[StrictStr], Field(description="The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).")] = None,
        sort: Annotated[Optional[StrictStr], Field(description="Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted ")] = None,
        sort_dir: Annotated[Optional[StrictStr], Field(description="Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)")] = 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,
    ) -> AdminConversationsSearchSchema:
        """admin_conversations_search

        Search for public or private channels in an Enterprise organization.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param team_ids: Comma separated string of team IDs, signifying the workspaces to search through.
        :type team_ids: str
        :param query: Name of the the channel to query by.
        :type query: str
        :param limit: Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
        :type limit: int
        :param cursor: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
        :type cursor: str
        :param search_channel_types: The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).
        :type search_channel_types: str
        :param sort: Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted 
        :type sort: str
        :param sort_dir: Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)
        :type sort_dir: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_search_serialize(
            token=token,
            team_ids=team_ids,
            query=query,
            limit=limit,
            cursor=cursor,
            search_channel_types=search_channel_types,
            sort=sort,
            sort_dir=sort_dir,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsSearchSchema",
        }
        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 admin_conversations_search_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        team_ids: Annotated[Optional[StrictStr], Field(description="Comma separated string of team IDs, signifying the workspaces to search through.")] = None,
        query: Annotated[Optional[StrictStr], Field(description="Name of the the channel to query by.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.")] = None,
        search_channel_types: Annotated[Optional[StrictStr], Field(description="The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).")] = None,
        sort: Annotated[Optional[StrictStr], Field(description="Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted ")] = None,
        sort_dir: Annotated[Optional[StrictStr], Field(description="Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)")] = 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[AdminConversationsSearchSchema]:
        """admin_conversations_search

        Search for public or private channels in an Enterprise organization.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param team_ids: Comma separated string of team IDs, signifying the workspaces to search through.
        :type team_ids: str
        :param query: Name of the the channel to query by.
        :type query: str
        :param limit: Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
        :type limit: int
        :param cursor: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
        :type cursor: str
        :param search_channel_types: The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).
        :type search_channel_types: str
        :param sort: Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted 
        :type sort: str
        :param sort_dir: Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)
        :type sort_dir: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_search_serialize(
            token=token,
            team_ids=team_ids,
            query=query,
            limit=limit,
            cursor=cursor,
            search_channel_types=search_channel_types,
            sort=sort,
            sort_dir=sort_dir,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsSearchSchema",
        }
        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 admin_conversations_search_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:read`")],
        team_ids: Annotated[Optional[StrictStr], Field(description="Comma separated string of team IDs, signifying the workspaces to search through.")] = None,
        query: Annotated[Optional[StrictStr], Field(description="Name of the the channel to query by.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.")] = None,
        search_channel_types: Annotated[Optional[StrictStr], Field(description="The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).")] = None,
        sort: Annotated[Optional[StrictStr], Field(description="Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted ")] = None,
        sort_dir: Annotated[Optional[StrictStr], Field(description="Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)")] = 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:
        """admin_conversations_search

        Search for public or private channels in an Enterprise organization.

        :param token: Authentication token. Requires scope: `admin.conversations:read` (required)
        :type token: str
        :param team_ids: Comma separated string of team IDs, signifying the workspaces to search through.
        :type team_ids: str
        :param query: Name of the the channel to query by.
        :type query: str
        :param limit: Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
        :type limit: int
        :param cursor: Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
        :type cursor: str
        :param search_channel_types: The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).
        :type search_channel_types: str
        :param sort: Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted 
        :type sort: str
        :param sort_dir: Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)
        :type sort_dir: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_search_serialize(
            token=token,
            team_ids=team_ids,
            query=query,
            limit=limit,
            cursor=cursor,
            search_channel_types=search_channel_types,
            sort=sort,
            sort_dir=sort_dir,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_search_serialize(
        self,
        token,
        team_ids,
        query,
        limit,
        cursor,
        search_channel_types,
        sort,
        sort_dir,
        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 team_ids is not None:
            
            _query_params.append(('team_ids', team_ids))
            
        if query is not None:
            
            _query_params.append(('query', query))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if cursor is not None:
            
            _query_params.append(('cursor', cursor))
            
        if search_channel_types is not None:
            
            _query_params.append(('search_channel_types', search_channel_types))
            
        if sort is not None:
            
            _query_params.append(('sort', sort))
            
        if sort_dir is not None:
            
            _query_params.append(('sort_dir', sort_dir))
            
        # process the header parameters
        if token is not None:
            _header_params['token'] = token
        # 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='/admin.conversations.search',
            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 admin_conversations_set_conversation_prefs(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to set the prefs for")],
        prefs: Annotated[StrictStr, Field(description="The prefs for this channel in a stringified JSON format.")],
        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,
    ) -> AdminConversationsSetConversationPrefsSchema:
        """admin_conversations_set_conversation_prefs

        Set the posting permissions for a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to set the prefs for (required)
        :type channel_id: str
        :param prefs: The prefs for this channel in a stringified JSON format. (required)
        :type prefs: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_set_conversation_prefs_serialize(
            token=token,
            channel_id=channel_id,
            prefs=prefs,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsSetConversationPrefsSchema",
        }
        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 admin_conversations_set_conversation_prefs_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to set the prefs for")],
        prefs: Annotated[StrictStr, Field(description="The prefs for this channel in a stringified JSON format.")],
        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[AdminConversationsSetConversationPrefsSchema]:
        """admin_conversations_set_conversation_prefs

        Set the posting permissions for a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to set the prefs for (required)
        :type channel_id: str
        :param prefs: The prefs for this channel in a stringified JSON format. (required)
        :type prefs: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_set_conversation_prefs_serialize(
            token=token,
            channel_id=channel_id,
            prefs=prefs,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsSetConversationPrefsSchema",
        }
        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 admin_conversations_set_conversation_prefs_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to set the prefs for")],
        prefs: Annotated[StrictStr, Field(description="The prefs for this channel in a stringified JSON format.")],
        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:
        """admin_conversations_set_conversation_prefs

        Set the posting permissions for a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to set the prefs for (required)
        :type channel_id: str
        :param prefs: The prefs for this channel in a stringified JSON format. (required)
        :type prefs: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_set_conversation_prefs_serialize(
            token=token,
            channel_id=channel_id,
            prefs=prefs,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_set_conversation_prefs_serialize(
        self,
        token,
        channel_id,
        prefs,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        if prefs is not None:
            _form_params.append(('prefs', prefs))
        # 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='/admin.conversations.setConversationPrefs',
            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 admin_conversations_set_teams(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The encoded `channel_id` to add or remove to workspaces.")],
        team_id: Annotated[Optional[StrictStr], Field(description="The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.")] = None,
        target_team_ids: Annotated[Optional[StrictStr], Field(description="A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.")] = None,
        org_channel: Annotated[Optional[StrictBool], Field(description="True if channel has to be converted to an org channel")] = 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,
    ) -> DefaultSuccessTemplate:
        """admin_conversations_set_teams

        Set the workspaces in an Enterprise grid org that connect to a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The encoded `channel_id` to add or remove to workspaces. (required)
        :type channel_id: str
        :param team_id: The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.
        :type team_id: str
        :param target_team_ids: A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
        :type target_team_ids: str
        :param org_channel: True if channel has to be converted to an org channel
        :type org_channel: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_set_teams_serialize(
            token=token,
            channel_id=channel_id,
            team_id=team_id,
            target_team_ids=target_team_ids,
            org_channel=org_channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 admin_conversations_set_teams_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The encoded `channel_id` to add or remove to workspaces.")],
        team_id: Annotated[Optional[StrictStr], Field(description="The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.")] = None,
        target_team_ids: Annotated[Optional[StrictStr], Field(description="A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.")] = None,
        org_channel: Annotated[Optional[StrictBool], Field(description="True if channel has to be converted to an org channel")] = 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[DefaultSuccessTemplate]:
        """admin_conversations_set_teams

        Set the workspaces in an Enterprise grid org that connect to a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The encoded `channel_id` to add or remove to workspaces. (required)
        :type channel_id: str
        :param team_id: The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.
        :type team_id: str
        :param target_team_ids: A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
        :type target_team_ids: str
        :param org_channel: True if channel has to be converted to an org channel
        :type org_channel: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_set_teams_serialize(
            token=token,
            channel_id=channel_id,
            team_id=team_id,
            target_team_ids=target_team_ids,
            org_channel=org_channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DefaultSuccessTemplate",
        }
        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 admin_conversations_set_teams_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The encoded `channel_id` to add or remove to workspaces.")],
        team_id: Annotated[Optional[StrictStr], Field(description="The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.")] = None,
        target_team_ids: Annotated[Optional[StrictStr], Field(description="A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.")] = None,
        org_channel: Annotated[Optional[StrictBool], Field(description="True if channel has to be converted to an org channel")] = 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:
        """admin_conversations_set_teams

        Set the workspaces in an Enterprise grid org that connect to a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The encoded `channel_id` to add or remove to workspaces. (required)
        :type channel_id: str
        :param team_id: The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.
        :type team_id: str
        :param target_team_ids: A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
        :type target_team_ids: str
        :param org_channel: True if channel has to be converted to an org channel
        :type org_channel: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_set_teams_serialize(
            token=token,
            channel_id=channel_id,
            team_id=team_id,
            target_team_ids=target_team_ids,
            org_channel=org_channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_set_teams_serialize(
        self,
        token,
        channel_id,
        team_id,
        target_team_ids,
        org_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_id is not None:
            _form_params.append(('channel_id', channel_id))
        if team_id is not None:
            _form_params.append(('team_id', team_id))
        if target_team_ids is not None:
            _form_params.append(('target_team_ids', target_team_ids))
        if org_channel is not None:
            _form_params.append(('org_channel', org_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='/admin.conversations.setTeams',
            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 admin_conversations_unarchive(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to unarchive.")],
        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,
    ) -> AdminConversationsUnarchiveSchema:
        """admin_conversations_unarchive

        Unarchive a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to unarchive. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_unarchive_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsUnarchiveSchema",
        }
        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 admin_conversations_unarchive_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to unarchive.")],
        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[AdminConversationsUnarchiveSchema]:
        """admin_conversations_unarchive

        Unarchive a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to unarchive. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_unarchive_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AdminConversationsUnarchiveSchema",
        }
        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 admin_conversations_unarchive_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin.conversations:write`")],
        channel_id: Annotated[StrictStr, Field(description="The channel to unarchive.")],
        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:
        """admin_conversations_unarchive

        Unarchive a public or private channel.

        :param token: Authentication token. Requires scope: `admin.conversations:write` (required)
        :type token: str
        :param channel_id: The channel to unarchive. (required)
        :type channel_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._admin_conversations_unarchive_serialize(
            token=token,
            channel_id=channel_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _admin_conversations_unarchive_serialize(
        self,
        token,
        channel_id,
        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_id is not None:
            _form_params.append(('channel_id', channel_id))
        # 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='/admin.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__
        )


