# 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, StrictStr
from typing import Optional
from typing_extensions import Annotated
from slack_ti.models.default_success_template import DefaultSuccessTemplate
from slack_ti.models.team_access_logs_schema import TeamAccessLogsSchema
from slack_ti.models.team_info_schema import TeamInfoSchema
from slack_ti.models.team_integration_logs_schema import TeamIntegrationLogsSchema
from slack_ti.models.team_profile_get_success_schema import TeamProfileGetSuccessSchema

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


class TeamApi:
    """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 team_access_logs(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        before: Annotated[Optional[StrictStr], Field(description="End of time range of logs to include in results (inclusive).")] = None,
        count: Optional[StrictStr] = None,
        page: Optional[StrictStr] = 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,
    ) -> TeamAccessLogsSchema:
        """team_access_logs

        Gets the access logs for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param before: End of time range of logs to include in results (inclusive).
        :type before: str
        :param count:
        :type count: str
        :param page:
        :type page: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_access_logs_serialize(
            token=token,
            before=before,
            count=count,
            page=page,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamAccessLogsSchema",
        }
        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 team_access_logs_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        before: Annotated[Optional[StrictStr], Field(description="End of time range of logs to include in results (inclusive).")] = None,
        count: Optional[StrictStr] = None,
        page: Optional[StrictStr] = 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[TeamAccessLogsSchema]:
        """team_access_logs

        Gets the access logs for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param before: End of time range of logs to include in results (inclusive).
        :type before: str
        :param count:
        :type count: str
        :param page:
        :type page: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_access_logs_serialize(
            token=token,
            before=before,
            count=count,
            page=page,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamAccessLogsSchema",
        }
        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 team_access_logs_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        before: Annotated[Optional[StrictStr], Field(description="End of time range of logs to include in results (inclusive).")] = None,
        count: Optional[StrictStr] = None,
        page: Optional[StrictStr] = 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:
        """team_access_logs

        Gets the access logs for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param before: End of time range of logs to include in results (inclusive).
        :type before: str
        :param count:
        :type count: str
        :param page:
        :type page: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_access_logs_serialize(
            token=token,
            before=before,
            count=count,
            page=page,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _team_access_logs_serialize(
        self,
        token,
        before,
        count,
        page,
        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 before is not None:
            
            _query_params.append(('before', before))
            
        if count is not None:
            
            _query_params.append(('count', count))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        # 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='/team.accessLogs',
            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 team_billable_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        user: Annotated[Optional[StrictStr], Field(description="A user to retrieve the billable information for. Defaults to all users.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> DefaultSuccessTemplate:
        """team_billable_info

        Gets billable users information for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param user: A user to retrieve the billable information for. Defaults to all users.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_billable_info_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': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def team_billable_info_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        user: Annotated[Optional[StrictStr], Field(description="A user to retrieve the billable information for. Defaults to all users.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[DefaultSuccessTemplate]:
        """team_billable_info

        Gets billable users information for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param user: A user to retrieve the billable information for. Defaults to all users.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_billable_info_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': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def team_billable_info_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        user: Annotated[Optional[StrictStr], Field(description="A user to retrieve the billable information for. Defaults to all users.")] = 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:
        """team_billable_info

        Gets billable users information for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param user: A user to retrieve the billable information for. Defaults to all users.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_billable_info_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': "DefaultSuccessTemplate",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _team_billable_info_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='/team.billableInfo',
            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 team_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `team:read`")],
        team: Annotated[Optional[StrictStr], Field(description="Team to get info on, if omitted, will return information about the current team. Team to get info about; if omitted, will return information about the current team.")] = 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,
    ) -> TeamInfoSchema:
        """team_info

        Gets information about the current team.

        :param token: Authentication token. Requires scope: `team:read` (required)
        :type token: str
        :param team: Team to get info on, if omitted, will return information about the current team. Team to get info about; if omitted, will return information about the current team.
        :type team: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamInfoSchema",
        }
        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 team_info_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `team:read`")],
        team: Annotated[Optional[StrictStr], Field(description="Team to get info on, if omitted, will return information about the current team. Team to get info about; if omitted, will return information about the current team.")] = 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[TeamInfoSchema]:
        """team_info

        Gets information about the current team.

        :param token: Authentication token. Requires scope: `team:read` (required)
        :type token: str
        :param team: Team to get info on, if omitted, will return information about the current team. Team to get info about; if omitted, will return information about the current team.
        :type team: str
        :return: Returns the result object.
        """ # noqa: E501

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamInfoSchema",
        }
        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 team_info_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `team:read`")],
        team: Annotated[Optional[StrictStr], Field(description="Team to get info on, if omitted, will return information about the current team. Team to get info about; if omitted, will return information about the current team.")] = 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:
        """team_info

        Gets information about the current team.

        :param token: Authentication token. Requires scope: `team:read` (required)
        :type token: str
        :param team: Team to get info on, if omitted, will return information about the current team. Team to get info about; if omitted, will return information about the current team.
        :type team: str
        :return: Returns the result object.
        """ # noqa: E501

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

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


    def _team_info_serialize(
        self,
        token,
        team,
        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 team is not None:
            
            _query_params.append(('team', team))
            
        # 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='/team.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 team_integration_logs(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        app_id: Annotated[Optional[StrictStr], Field(description="Filter logs to this Slack app. Defaults to all logs.")] = None,
        change_type: Annotated[Optional[StrictStr], Field(description="Filter logs with this change type. Defaults to all logs.")] = None,
        count: Optional[StrictStr] = None,
        page: Optional[StrictStr] = None,
        service_id: Annotated[Optional[StrictStr], Field(description="Filter logs to this service. Defaults to all logs.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="Filter logs generated by this user’s actions. Defaults to all logs.")] = 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,
    ) -> TeamIntegrationLogsSchema:
        """team_integration_logs

        Gets the integration logs for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param app_id: Filter logs to this Slack app. Defaults to all logs.
        :type app_id: str
        :param change_type: Filter logs with this change type. Defaults to all logs.
        :type change_type: str
        :param count:
        :type count: str
        :param page:
        :type page: str
        :param service_id: Filter logs to this service. Defaults to all logs.
        :type service_id: str
        :param user: Filter logs generated by this user’s actions. Defaults to all logs.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_integration_logs_serialize(
            token=token,
            app_id=app_id,
            change_type=change_type,
            count=count,
            page=page,
            service_id=service_id,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamIntegrationLogsSchema",
        }
        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 team_integration_logs_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        app_id: Annotated[Optional[StrictStr], Field(description="Filter logs to this Slack app. Defaults to all logs.")] = None,
        change_type: Annotated[Optional[StrictStr], Field(description="Filter logs with this change type. Defaults to all logs.")] = None,
        count: Optional[StrictStr] = None,
        page: Optional[StrictStr] = None,
        service_id: Annotated[Optional[StrictStr], Field(description="Filter logs to this service. Defaults to all logs.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="Filter logs generated by this user’s actions. Defaults to all logs.")] = 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[TeamIntegrationLogsSchema]:
        """team_integration_logs

        Gets the integration logs for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param app_id: Filter logs to this Slack app. Defaults to all logs.
        :type app_id: str
        :param change_type: Filter logs with this change type. Defaults to all logs.
        :type change_type: str
        :param count:
        :type count: str
        :param page:
        :type page: str
        :param service_id: Filter logs to this service. Defaults to all logs.
        :type service_id: str
        :param user: Filter logs generated by this user’s actions. Defaults to all logs.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_integration_logs_serialize(
            token=token,
            app_id=app_id,
            change_type=change_type,
            count=count,
            page=page,
            service_id=service_id,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamIntegrationLogsSchema",
        }
        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 team_integration_logs_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `admin`")],
        app_id: Annotated[Optional[StrictStr], Field(description="Filter logs to this Slack app. Defaults to all logs.")] = None,
        change_type: Annotated[Optional[StrictStr], Field(description="Filter logs with this change type. Defaults to all logs.")] = None,
        count: Optional[StrictStr] = None,
        page: Optional[StrictStr] = None,
        service_id: Annotated[Optional[StrictStr], Field(description="Filter logs to this service. Defaults to all logs.")] = None,
        user: Annotated[Optional[StrictStr], Field(description="Filter logs generated by this user’s actions. Defaults to all logs.")] = 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:
        """team_integration_logs

        Gets the integration logs for the current team.

        :param token: Authentication token. Requires scope: `admin` (required)
        :type token: str
        :param app_id: Filter logs to this Slack app. Defaults to all logs.
        :type app_id: str
        :param change_type: Filter logs with this change type. Defaults to all logs.
        :type change_type: str
        :param count:
        :type count: str
        :param page:
        :type page: str
        :param service_id: Filter logs to this service. Defaults to all logs.
        :type service_id: str
        :param user: Filter logs generated by this user’s actions. Defaults to all logs.
        :type user: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._team_integration_logs_serialize(
            token=token,
            app_id=app_id,
            change_type=change_type,
            count=count,
            page=page,
            service_id=service_id,
            user=user,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _team_integration_logs_serialize(
        self,
        token,
        app_id,
        change_type,
        count,
        page,
        service_id,
        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 app_id is not None:
            
            _query_params.append(('app_id', app_id))
            
        if change_type is not None:
            
            _query_params.append(('change_type', change_type))
            
        if count is not None:
            
            _query_params.append(('count', count))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        if service_id is not None:
            
            _query_params.append(('service_id', service_id))
            
        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='/team.integrationLogs',
            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 team_profile_get_0(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:read`")],
        visibility: Annotated[Optional[StrictStr], Field(description="Filter by visibility.")] = 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,
    ) -> TeamProfileGetSuccessSchema:
        """team_profile_get_0

        Retrieve a team's profile.

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

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamProfileGetSuccessSchema",
        }
        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 team_profile_get_0_with_http_info(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:read`")],
        visibility: Annotated[Optional[StrictStr], Field(description="Filter by visibility.")] = 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[TeamProfileGetSuccessSchema]:
        """team_profile_get_0

        Retrieve a team's profile.

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

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

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TeamProfileGetSuccessSchema",
        }
        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 team_profile_get_0_without_preload_content(
        self,
        token: Annotated[StrictStr, Field(description="Authentication token. Requires scope: `users.profile:read`")],
        visibility: Annotated[Optional[StrictStr], Field(description="Filter by visibility.")] = 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:
        """team_profile_get_0

        Retrieve a team's profile.

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

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

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


    def _team_profile_get_0_serialize(
        self,
        token,
        visibility,
        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 visibility is not None:
            
            _query_params.append(('visibility', visibility))
            
        # 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='/team.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__
        )


