# 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 List, Optional
from typing_extensions import Annotated
from slack_beta_ti.models.api_method_users_get_presence import APIMethodUsersGetPresence
from slack_beta_ti.models.users_conversations_success_schema import UsersConversationsSuccessSchema
from slack_beta_ti.models.users_delete_photo_schema import UsersDeletePhotoSchema
from slack_beta_ti.models.users_info_success_schema import UsersInfoSuccessSchema
from slack_beta_ti.models.users_list_schema import UsersListSchema
from slack_beta_ti.models.users_lookup_by_email_success_schema import UsersLookupByEmailSuccessSchema
from slack_beta_ti.models.users_profile_get_schema import UsersProfileGetSchema
from slack_beta_ti.models.users_profile_set_schema import UsersProfileSetSchema
from slack_beta_ti.models.users_set_active_schema import UsersSetActiveSchema
from slack_beta_ti.models.users_set_photo_schema import UsersSetPhotoSchema
from slack_beta_ti.models.users_set_presence_schema import UsersSetPresenceSchema

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

        List conversations the calling user may access.

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

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersConversationsSuccessSchema",
        }
        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 users_conversations_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        user: Annotated[Optional[StrictStr], Field(description="Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.")] = None,
        types: Annotated[Optional[StrictStr], Field(description="Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`")] = None,
        exclude_archived: Annotated[Optional[StrictBool], Field(description="Set to `true` to exclude archived channels from the list")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[UsersConversationsSuccessSchema]:
        """users_conversations

        List conversations the calling user may access.

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

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersConversationsSuccessSchema",
        }
        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 users_conversations_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `conversations:read`")] = None,
        user: Annotated[Optional[StrictStr], Field(description="Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.")] = None,
        types: Annotated[Optional[StrictStr], Field(description="Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`")] = None,
        exclude_archived: Annotated[Optional[StrictBool], Field(description="Set to `true` to exclude archived channels from the list")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """users_conversations

        List conversations the calling user may access.

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

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

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


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


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/users.conversations',
            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 users_delete_photo(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        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,
    ) -> UsersDeletePhotoSchema:
        """users_delete_photo

        Delete the user profile photo

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersDeletePhotoSchema",
        }
        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 users_delete_photo_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        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[UsersDeletePhotoSchema]:
        """users_delete_photo

        Delete the user profile photo

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersDeletePhotoSchema",
        }
        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 users_delete_photo_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        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:
        """users_delete_photo

        Delete the user profile photo

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

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


    def _users_delete_photo_serialize(
        self,
        token,
        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
        # process the form parameters
        if token is not None:
            _form_params.append(('token', token))
        # 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'
                    ]
                )
            )
            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='/users.deletePhoto',
            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 users_get_presence(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read`")],
        user: Annotated[Optional[StrictStr], Field(description="User to get presence info on. Defaults to the authed user.")] = 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,
    ) -> APIMethodUsersGetPresence:
        """users_get_presence

        Gets user presence information.

        :param token: Authentication token. Requires scope: `users:read` (required)
        :type token: str
        :param user: User to get presence info on. Defaults to the authed user.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "APIMethodUsersGetPresence",
        }
        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 users_get_presence_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read`")],
        user: Annotated[Optional[StrictStr], Field(description="User to get presence info on. Defaults to the authed user.")] = 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[APIMethodUsersGetPresence]:
        """users_get_presence

        Gets user presence information.

        :param token: Authentication token. Requires scope: `users:read` (required)
        :type token: str
        :param user: User to get presence info on. Defaults to the authed user.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "APIMethodUsersGetPresence",
        }
        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 users_get_presence_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read`")],
        user: Annotated[Optional[StrictStr], Field(description="User to get presence info on. Defaults to the authed user.")] = 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:
        """users_get_presence

        Gets user presence information.

        :param token: Authentication token. Requires scope: `users:read` (required)
        :type token: str
        :param user: User to get presence info on. Defaults to the authed user.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

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

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


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


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/users.getPresence',
            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 users_identity(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `identity.basic`")] = 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,
    ) -> List[str]:
        """users_identity

        Get a user's identity.

        :param token: Authentication token. Requires scope: `identity.basic`
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[str]",
        }
        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 users_identity_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `identity.basic`")] = 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[List[str]]:
        """users_identity

        Get a user's identity.

        :param token: Authentication token. Requires scope: `identity.basic`
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[str]",
        }
        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 users_identity_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `identity.basic`")] = 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:
        """users_identity

        Get a user's identity.

        :param token: Authentication token. Requires scope: `identity.basic`
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

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


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


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/users.identity',
            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 users_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read`")],
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for this user. Defaults to `false`")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User to get info on")] = 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,
    ) -> UsersInfoSuccessSchema:
        """users_info

        Gets information about a user.

        :param token: Authentication token. Requires scope: `users:read` (required)
        :type token: str
        :param include_locale: Set this to `true` to receive the locale for this user. Defaults to `false`
        :type include_locale: bool
        :param user: User to get info on
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_info_serialize(
            token=token,
            include_locale=include_locale,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersInfoSuccessSchema",
        }
        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 users_info_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read`")],
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for this user. Defaults to `false`")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User to get info on")] = 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[UsersInfoSuccessSchema]:
        """users_info

        Gets information about a user.

        :param token: Authentication token. Requires scope: `users:read` (required)
        :type token: str
        :param include_locale: Set this to `true` to receive the locale for this user. Defaults to `false`
        :type include_locale: bool
        :param user: User to get info on
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_info_serialize(
            token=token,
            include_locale=include_locale,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersInfoSuccessSchema",
        }
        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 users_info_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read`")],
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for this user. Defaults to `false`")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User to get info on")] = 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:
        """users_info

        Gets information about a user.

        :param token: Authentication token. Requires scope: `users:read` (required)
        :type token: str
        :param include_locale: Set this to `true` to receive the locale for this user. Defaults to `false`
        :type include_locale: bool
        :param user: User to get info on
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_info_serialize(
            token=token,
            include_locale=include_locale,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _users_info_serialize(
        self,
        token,
        include_locale,
        user,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

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




    @validate_call
    def users_list(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `users:read`")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for users. Defaults to `false`")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> UsersListSchema:
        """users_list

        Lists all users in a Slack team.

        :param token: Authentication token. Requires scope: `users:read`
        :type token: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :param include_locale: Set this to `true` to receive the locale for users. Defaults to `false`
        :type include_locale: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_list_serialize(
            token=token,
            limit=limit,
            cursor=cursor,
            include_locale=include_locale,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersListSchema",
        }
        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 users_list_with_http_info(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `users:read`")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for users. Defaults to `false`")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[UsersListSchema]:
        """users_list

        Lists all users in a Slack team.

        :param token: Authentication token. Requires scope: `users:read`
        :type token: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :param include_locale: Set this to `true` to receive the locale for users. Defaults to `false`
        :type include_locale: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_list_serialize(
            token=token,
            limit=limit,
            cursor=cursor,
            include_locale=include_locale,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersListSchema",
        }
        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 users_list_without_preload_content(
        self,
        token: Annotated[Optional[StrictStr], Field(description="Authentication token. Requires scope: `users:read`")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.")] = None,
        cursor: Annotated[Optional[StrictStr], Field(description="Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.")] = None,
        include_locale: Annotated[Optional[StrictBool], Field(description="Set this to `true` to receive the locale for users. Defaults to `false`")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """users_list

        Lists all users in a Slack team.

        :param token: Authentication token. Requires scope: `users:read`
        :type token: str
        :param limit: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.
        :type limit: int
        :param cursor: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.
        :type cursor: str
        :param include_locale: Set this to `true` to receive the locale for users. Defaults to `false`
        :type include_locale: bool
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_list_serialize(
            token=token,
            limit=limit,
            cursor=cursor,
            include_locale=include_locale,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


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


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

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




    @validate_call
    def users_lookup_by_email(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read.email`")],
        email: Annotated[StrictStr, Field(description="An email address belonging to a user in the workspace")],
        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,
    ) -> UsersLookupByEmailSuccessSchema:
        """users_lookup_by_email

        Find a user with an email address.

        :param token: Authentication token. Requires scope: `users:read.email` (required)
        :type token: str
        :param email: An email address belonging to a user in the workspace (required)
        :type email: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_lookup_by_email_serialize(
            token=token,
            email=email,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersLookupByEmailSuccessSchema",
        }
        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 users_lookup_by_email_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read.email`")],
        email: Annotated[StrictStr, Field(description="An email address belonging to a user in the workspace")],
        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[UsersLookupByEmailSuccessSchema]:
        """users_lookup_by_email

        Find a user with an email address.

        :param token: Authentication token. Requires scope: `users:read.email` (required)
        :type token: str
        :param email: An email address belonging to a user in the workspace (required)
        :type email: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_lookup_by_email_serialize(
            token=token,
            email=email,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersLookupByEmailSuccessSchema",
        }
        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 users_lookup_by_email_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:read.email`")],
        email: Annotated[StrictStr, Field(description="An email address belonging to a user in the workspace")],
        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:
        """users_lookup_by_email

        Find a user with an email address.

        :param token: Authentication token. Requires scope: `users:read.email` (required)
        :type token: str
        :param email: An email address belonging to a user in the workspace (required)
        :type email: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_lookup_by_email_serialize(
            token=token,
            email=email,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _users_lookup_by_email_serialize(
        self,
        token,
        email,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/users.lookupByEmail',
            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 users_profile_get(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:read`")],
        include_labels: Annotated[Optional[StrictBool], Field(description="Include labels for each ID in custom profile fields")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User to retrieve profile info for")] = 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,
    ) -> UsersProfileGetSchema:
        """users_profile_get

        Retrieves a user's profile information.

        :param token: Authentication token. Requires scope: `users.profile:read` (required)
        :type token: str
        :param include_labels: Include labels for each ID in custom profile fields
        :type include_labels: bool
        :param user: User to retrieve profile info for
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_profile_get_serialize(
            token=token,
            include_labels=include_labels,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersProfileGetSchema",
        }
        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 users_profile_get_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:read`")],
        include_labels: Annotated[Optional[StrictBool], Field(description="Include labels for each ID in custom profile fields")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User to retrieve profile info for")] = 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[UsersProfileGetSchema]:
        """users_profile_get

        Retrieves a user's profile information.

        :param token: Authentication token. Requires scope: `users.profile:read` (required)
        :type token: str
        :param include_labels: Include labels for each ID in custom profile fields
        :type include_labels: bool
        :param user: User to retrieve profile info for
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_profile_get_serialize(
            token=token,
            include_labels=include_labels,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersProfileGetSchema",
        }
        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 users_profile_get_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:read`")],
        include_labels: Annotated[Optional[StrictBool], Field(description="Include labels for each ID in custom profile fields")] = None,
        user: Annotated[Optional[StrictStr], Field(description="User to retrieve profile info for")] = 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:
        """users_profile_get

        Retrieves a user's profile information.

        :param token: Authentication token. Requires scope: `users.profile:read` (required)
        :type token: str
        :param include_labels: Include labels for each ID in custom profile fields
        :type include_labels: bool
        :param user: User to retrieve profile info for
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_profile_get_serialize(
            token=token,
            include_labels=include_labels,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _users_profile_get_serialize(
        self,
        token,
        include_labels,
        user,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

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

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


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


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

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/users.profile.get',
            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 users_profile_set(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        name: Annotated[Optional[StrictStr], Field(description="Name of a single key to set. Usable only if `profile` is not passed.")] = None,
        profile: Annotated[Optional[StrictStr], Field(description="Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="ID of user to change. This argument may only be specified by team admins on paid teams.")] = None,
        value: Annotated[Optional[StrictStr], Field(description="Value to set a single key to. Usable only if `profile` is not passed.")] = 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,
    ) -> UsersProfileSetSchema:
        """users_profile_set

        Set the profile information for a user.

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :param name: Name of a single key to set. Usable only if `profile` is not passed.
        :type name: str
        :param profile: Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
        :type profile: str
        :param user: ID of user to change. This argument may only be specified by team admins on paid teams.
        :type user: str
        :param value: Value to set a single key to. Usable only if `profile` is not passed.
        :type value: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_profile_set_serialize(
            token=token,
            name=name,
            profile=profile,
            user=user,
            value=value,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersProfileSetSchema",
        }
        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 users_profile_set_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        name: Annotated[Optional[StrictStr], Field(description="Name of a single key to set. Usable only if `profile` is not passed.")] = None,
        profile: Annotated[Optional[StrictStr], Field(description="Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="ID of user to change. This argument may only be specified by team admins on paid teams.")] = None,
        value: Annotated[Optional[StrictStr], Field(description="Value to set a single key to. Usable only if `profile` is not passed.")] = 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[UsersProfileSetSchema]:
        """users_profile_set

        Set the profile information for a user.

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :param name: Name of a single key to set. Usable only if `profile` is not passed.
        :type name: str
        :param profile: Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
        :type profile: str
        :param user: ID of user to change. This argument may only be specified by team admins on paid teams.
        :type user: str
        :param value: Value to set a single key to. Usable only if `profile` is not passed.
        :type value: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_profile_set_serialize(
            token=token,
            name=name,
            profile=profile,
            user=user,
            value=value,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersProfileSetSchema",
        }
        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 users_profile_set_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        name: Annotated[Optional[StrictStr], Field(description="Name of a single key to set. Usable only if `profile` is not passed.")] = None,
        profile: Annotated[Optional[StrictStr], Field(description="Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="ID of user to change. This argument may only be specified by team admins on paid teams.")] = None,
        value: Annotated[Optional[StrictStr], Field(description="Value to set a single key to. Usable only if `profile` is not passed.")] = 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:
        """users_profile_set

        Set the profile information for a user.

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :param name: Name of a single key to set. Usable only if `profile` is not passed.
        :type name: str
        :param profile: Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
        :type profile: str
        :param user: ID of user to change. This argument may only be specified by team admins on paid teams.
        :type user: str
        :param value: Value to set a single key to. Usable only if `profile` is not passed.
        :type value: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_profile_set_serialize(
            token=token,
            name=name,
            profile=profile,
            user=user,
            value=value,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _users_profile_set_serialize(
        self,
        token,
        name,
        profile,
        user,
        value,
        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 profile is not None:
            _form_params.append(('profile', profile))
        if user is not None:
            _form_params.append(('user', user))
        if value is not None:
            _form_params.append(('value', value))
        # 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='/users.profile.set',
            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 users_set_active(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:write`")],
        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,
    ) -> UsersSetActiveSchema:
        """users_set_active

        Marked a user as active. Deprecated and non-functional.

        :param token: Authentication token. Requires scope: `users:write` (required)
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersSetActiveSchema",
        }
        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 users_set_active_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:write`")],
        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[UsersSetActiveSchema]:
        """users_set_active

        Marked a user as active. Deprecated and non-functional.

        :param token: Authentication token. Requires scope: `users:write` (required)
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersSetActiveSchema",
        }
        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 users_set_active_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:write`")],
        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:
        """users_set_active

        Marked a user as active. Deprecated and non-functional.

        :param token: Authentication token. Requires scope: `users:write` (required)
        :type token: str
        :return: Returns the result object.
        """ # noqa: E501

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

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


    def _users_set_active_serialize(
        self,
        token,
        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
        # 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='POST',
            resource_path='/users.setActive',
            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 users_set_photo(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        crop_w: Annotated[Optional[StrictStr], Field(description="Width/height of crop box (always square)")] = None,
        crop_x: Annotated[Optional[StrictStr], Field(description="X coordinate of top-left corner of crop box")] = None,
        crop_y: Annotated[Optional[StrictStr], Field(description="Y coordinate of top-left corner of crop box")] = None,
        image: Annotated[Optional[StrictStr], Field(description="File contents via `multipart/form-data`.")] = 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,
    ) -> UsersSetPhotoSchema:
        """users_set_photo

        Set the user profile photo

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :param crop_w: Width/height of crop box (always square)
        :type crop_w: str
        :param crop_x: X coordinate of top-left corner of crop box
        :type crop_x: str
        :param crop_y: Y coordinate of top-left corner of crop box
        :type crop_y: str
        :param image: File contents via `multipart/form-data`.
        :type image: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_set_photo_serialize(
            token=token,
            crop_w=crop_w,
            crop_x=crop_x,
            crop_y=crop_y,
            image=image,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersSetPhotoSchema",
        }
        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 users_set_photo_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        crop_w: Annotated[Optional[StrictStr], Field(description="Width/height of crop box (always square)")] = None,
        crop_x: Annotated[Optional[StrictStr], Field(description="X coordinate of top-left corner of crop box")] = None,
        crop_y: Annotated[Optional[StrictStr], Field(description="Y coordinate of top-left corner of crop box")] = None,
        image: Annotated[Optional[StrictStr], Field(description="File contents via `multipart/form-data`.")] = 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[UsersSetPhotoSchema]:
        """users_set_photo

        Set the user profile photo

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :param crop_w: Width/height of crop box (always square)
        :type crop_w: str
        :param crop_x: X coordinate of top-left corner of crop box
        :type crop_x: str
        :param crop_y: Y coordinate of top-left corner of crop box
        :type crop_y: str
        :param image: File contents via `multipart/form-data`.
        :type image: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_set_photo_serialize(
            token=token,
            crop_w=crop_w,
            crop_x=crop_x,
            crop_y=crop_y,
            image=image,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersSetPhotoSchema",
        }
        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 users_set_photo_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:write`")],
        crop_w: Annotated[Optional[StrictStr], Field(description="Width/height of crop box (always square)")] = None,
        crop_x: Annotated[Optional[StrictStr], Field(description="X coordinate of top-left corner of crop box")] = None,
        crop_y: Annotated[Optional[StrictStr], Field(description="Y coordinate of top-left corner of crop box")] = None,
        image: Annotated[Optional[StrictStr], Field(description="File contents via `multipart/form-data`.")] = 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:
        """users_set_photo

        Set the user profile photo

        :param token: Authentication token. Requires scope: `users.profile:write` (required)
        :type token: str
        :param crop_w: Width/height of crop box (always square)
        :type crop_w: str
        :param crop_x: X coordinate of top-left corner of crop box
        :type crop_x: str
        :param crop_y: Y coordinate of top-left corner of crop box
        :type crop_y: str
        :param image: File contents via `multipart/form-data`.
        :type image: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_set_photo_serialize(
            token=token,
            crop_w=crop_w,
            crop_x=crop_x,
            crop_y=crop_y,
            image=image,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _users_set_photo_serialize(
        self,
        token,
        crop_w,
        crop_x,
        crop_y,
        image,
        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
        # process the form parameters
        if token is not None:
            _form_params.append(('token', token))
        if crop_w is not None:
            _form_params.append(('crop_w', crop_w))
        if crop_x is not None:
            _form_params.append(('crop_x', crop_x))
        if crop_y is not None:
            _form_params.append(('crop_y', crop_y))
        if image is not None:
            _form_params.append(('image', image))
        # 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'
                    ]
                )
            )
            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='/users.setPhoto',
            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 users_set_presence(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:write`")],
        presence: Annotated[StrictStr, Field(description="Either `auto` or `away`")],
        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,
    ) -> UsersSetPresenceSchema:
        """users_set_presence

        Manually sets user presence.

        :param token: Authentication token. Requires scope: `users:write` (required)
        :type token: str
        :param presence: Either `auto` or `away` (required)
        :type presence: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_set_presence_serialize(
            token=token,
            presence=presence,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersSetPresenceSchema",
        }
        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 users_set_presence_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:write`")],
        presence: Annotated[StrictStr, Field(description="Either `auto` or `away`")],
        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[UsersSetPresenceSchema]:
        """users_set_presence

        Manually sets user presence.

        :param token: Authentication token. Requires scope: `users:write` (required)
        :type token: str
        :param presence: Either `auto` or `away` (required)
        :type presence: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_set_presence_serialize(
            token=token,
            presence=presence,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UsersSetPresenceSchema",
        }
        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 users_set_presence_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users:write`")],
        presence: Annotated[StrictStr, Field(description="Either `auto` or `away`")],
        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:
        """users_set_presence

        Manually sets user presence.

        :param token: Authentication token. Requires scope: `users:write` (required)
        :type token: str
        :param presence: Either `auto` or `away` (required)
        :type presence: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._users_set_presence_serialize(
            token=token,
            presence=presence,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _users_set_presence_serialize(
        self,
        token,
        presence,
        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 presence is not None:
            _form_params.append(('presence', presence))
        # 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='/users.setPresence',
            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__
        )


