# coding: utf-8

"""
    Prompt.io APIs

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class TeamMembersApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

    def add_identity1(self, team_member_id, **kwargs):  # noqa: E501
        """Adds an identity to a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.addIdentity_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_identity1(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param AddIdentityTeamMemberRequestModel body:
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.add_identity1_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.add_identity1_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def add_identity1_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Adds an identity to a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.addIdentity_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_identity1_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param AddIdentityTeamMemberRequestModel body:
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method add_identity1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `add_identity1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/identity', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def add_team_member(self, **kwargs):  # noqa: E501
        """Creates a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.addTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_team_member(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AddTeamMemberModel body:
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.add_team_member_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.add_team_member_with_http_info(**kwargs)  # noqa: E501
            return data

    def add_team_member_with_http_info(self, **kwargs):  # noqa: E501
        """Creates a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.addTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_team_member_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AddTeamMemberModel body:
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method add_team_member" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_team_member(self, team_member_id, **kwargs):  # noqa: E501
        """Deletes a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.deleteTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_team_member(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_team_member_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_team_member_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def delete_team_member_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Deletes a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.deleteTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_team_member_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_team_member" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `delete_team_member`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_aggregate_permissions(self, team_member_id, **kwargs):  # noqa: E501
        """Gets a team member's permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.getAggregatePermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_aggregate_permissions(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_aggregate_permissions_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_aggregate_permissions_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_aggregate_permissions_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Gets a team member's permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.getAggregatePermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_aggregate_permissions_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_aggregate_permissions" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_aggregate_permissions`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/aggregate-permissions', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_org_channel_permission1(self, team_member_id, org_channel_id, permission, **kwargs):  # noqa: E501
        """Gets a team member's orgChannel permission  # noqa: E501

        _in snippets: platform.api.teamMembers.getOrgChannelPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_channel_permission1(team_member_id, org_channel_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :param str permission: (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_org_channel_permission1_with_http_info(team_member_id, org_channel_id, permission, **kwargs)  # noqa: E501
        else:
            (data) = self.get_org_channel_permission1_with_http_info(team_member_id, org_channel_id, permission, **kwargs)  # noqa: E501
            return data

    def get_org_channel_permission1_with_http_info(self, team_member_id, org_channel_id, permission, **kwargs):  # noqa: E501
        """Gets a team member's orgChannel permission  # noqa: E501

        _in snippets: platform.api.teamMembers.getOrgChannelPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_channel_permission1_with_http_info(team_member_id, org_channel_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :param str permission: (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'org_channel_id', 'permission']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_org_channel_permission1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_org_channel_permission1`")  # noqa: E501
        # verify the required parameter 'org_channel_id' is set
        if ('org_channel_id' not in params or
                params['org_channel_id'] is None):
            raise ValueError("Missing the required parameter `org_channel_id` when calling `get_org_channel_permission1`")  # noqa: E501
        # verify the required parameter 'permission' is set
        if ('permission' not in params or
                params['permission'] is None):
            raise ValueError("Missing the required parameter `permission` when calling `get_org_channel_permission1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501
        if 'permission' in params:
            path_params['permission'] = params['permission']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/org_channels/{orgChannelId}/permissions/{permission}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='bool',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_org_channel_permissions1(self, team_member_id, org_channel_id, **kwargs):  # noqa: E501
        """Gets a team member's orgChannel permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.getOrgChannelPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_channel_permissions1(team_member_id, org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_org_channel_permissions1_with_http_info(team_member_id, org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_org_channel_permissions1_with_http_info(team_member_id, org_channel_id, **kwargs)  # noqa: E501
            return data

    def get_org_channel_permissions1_with_http_info(self, team_member_id, org_channel_id, **kwargs):  # noqa: E501
        """Gets a team member's orgChannel permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.getOrgChannelPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_channel_permissions1_with_http_info(team_member_id, org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'org_channel_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_org_channel_permissions1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_org_channel_permissions1`")  # noqa: E501
        # verify the required parameter 'org_channel_id' is set
        if ('org_channel_id' not in params or
                params['org_channel_id'] is None):
            raise ValueError("Missing the required parameter `org_channel_id` when calling `get_org_channel_permissions1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/org_channels/{orgChannelId}/permissions', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_org_channels_with_permissions(self, team_member_id, **kwargs):  # noqa: E501
        """Gets the org channels a team member has permissions for  # noqa: E501

        _in snippets: platform.api.teamMembers.getOrgChannelsWithPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_channels_with_permissions(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str team_member_id: (required)
        :param int first:
        :param int max:
        :return: OrgChannelWithPermissionsModelPage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_org_channels_with_permissions_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_org_channels_with_permissions_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_org_channels_with_permissions_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Gets the org channels a team member has permissions for  # noqa: E501

        _in snippets: platform.api.teamMembers.getOrgChannelsWithPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_org_channels_with_permissions_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str team_member_id: (required)
        :param int first:
        :param int max:
        :return: OrgChannelWithPermissionsModelPage
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'first', 'max']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_org_channels_with_permissions" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_org_channels_with_permissions`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []
        if 'first' in params:
            query_params.append(('first', params['first']))  # noqa: E501
        if 'max' in params:
            query_params.append(('max', params['max']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/org_channels', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OrgChannelWithPermissionsModelPage',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_permission1(self, team_member_id, permission, **kwargs):  # noqa: E501
        """Gets a team member's permission  # noqa: E501

        _in snippets: platform.api.teamMembers.getPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_permission1(team_member_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param str permission: (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_permission1_with_http_info(team_member_id, permission, **kwargs)  # noqa: E501
        else:
            (data) = self.get_permission1_with_http_info(team_member_id, permission, **kwargs)  # noqa: E501
            return data

    def get_permission1_with_http_info(self, team_member_id, permission, **kwargs):  # noqa: E501
        """Gets a team member's permission  # noqa: E501

        _in snippets: platform.api.teamMembers.getPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_permission1_with_http_info(team_member_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param str permission: (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'permission']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_permission1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_permission1`")  # noqa: E501
        # verify the required parameter 'permission' is set
        if ('permission' not in params or
                params['permission'] is None):
            raise ValueError("Missing the required parameter `permission` when calling `get_permission1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'permission' in params:
            path_params['permission'] = params['permission']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/permissions/{permission}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='bool',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_permissions1(self, team_member_id, **kwargs):  # noqa: E501
        """Gets a team member's permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.getPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_permissions1(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_permissions1_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_permissions1_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_permissions1_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Gets a team member's permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.getPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_permissions1_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_permissions1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_permissions1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/permissions', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[str]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_private_apps(self, team_member_id, **kwargs):  # noqa: E501
        """Installs private agent app for the given agent  # noqa: E501

        _in snippets: platform.api.teamMembers.getPrivateApps_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_private_apps(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_private_apps_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_private_apps_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_private_apps_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Installs private agent app for the given agent  # noqa: E501

        _in snippets: platform.api.teamMembers.getPrivateApps_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_private_apps_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_private_apps" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_private_apps`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/apps', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[int]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_shared_apps(self, **kwargs):  # noqa: E501
        """Gets installed shared agent apps  # noqa: E501

        _in snippets: platform.api.teamMembers.getSharedApps_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_shared_apps(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_shared_apps_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_shared_apps_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_shared_apps_with_http_info(self, **kwargs):  # noqa: E501
        """Gets installed shared agent apps  # noqa: E501

        _in snippets: platform.api.teamMembers.getSharedApps_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_shared_apps_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_shared_apps" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/apps', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[int]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_team_activity(self, **kwargs):  # noqa: E501
        """Returns a snapshot of team activity  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_activity(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str start:
        :param str end:
        :param str group_id:
        :return: TeamActivityModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_team_activity_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_team_activity_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_team_activity_with_http_info(self, **kwargs):  # noqa: E501
        """Returns a snapshot of team activity  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_activity_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str start:
        :param str end:
        :param str group_id:
        :return: TeamActivityModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['start', 'end', 'group_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_team_activity" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'start' in params:
            query_params.append(('start', params['start']))  # noqa: E501
        if 'end' in params:
            query_params.append(('end', params['end']))  # noqa: E501
        if 'group_id' in params:
            query_params.append(('groupId', params['group_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/activity', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamActivityModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_team_member(self, team_member_id, **kwargs):  # noqa: E501
        """Gets the details for a specific team member  # noqa: E501

        _in snippets: platform.api.teamMembers.getTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_member(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_team_member_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_team_member_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_team_member_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Gets the details for a specific team member  # noqa: E501

        _in snippets: platform.api.teamMembers.getTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_member_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_team_member" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_team_member`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_team_member_activity(self, team_member_id, **kwargs):  # noqa: E501
        """Returns a snapshot of a team members activity  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_member_activity(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param str start:
        :param str end:
        :return: TeamActivityModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_team_member_activity_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_team_member_activity_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_team_member_activity_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Returns a snapshot of a team members activity  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_member_activity_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param str start:
        :param str end:
        :return: TeamActivityModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'start', 'end']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_team_member_activity" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_team_member_activity`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []
        if 'start' in params:
            query_params.append(('start', params['start']))  # noqa: E501
        if 'end' in params:
            query_params.append(('end', params['end']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/activity', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamActivityModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_team_member_notifications(self, team_member_id, **kwargs):  # noqa: E501
        """Gets a team member's notification settings  # noqa: E501

        _in snippets: platform.api.teamMembers.getTeamMemberNotifications_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_member_notifications(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: TeamMemberNotificationModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_team_member_notifications_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_team_member_notifications_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def get_team_member_notifications_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Gets a team member's notification settings  # noqa: E501

        _in snippets: platform.api.teamMembers.getTeamMemberNotifications_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_member_notifications_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :return: TeamMemberNotificationModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_team_member_notifications" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `get_team_member_notifications`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/notifications', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberNotificationModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_team_members(self, **kwargs):  # noqa: E501
        """Gets all the team members in the org  # noqa: E501

        _in snippets: platform.api.teamMembers.getTeamMembers_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_members(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int first:
        :param int max:
        :return: TeamMemberModelPage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_team_members_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_team_members_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_team_members_with_http_info(self, **kwargs):  # noqa: E501
        """Gets all the team members in the org  # noqa: E501

        _in snippets: platform.api.teamMembers.getTeamMembers_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_team_members_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int first:
        :param int max:
        :return: TeamMemberModelPage
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['first', 'max']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_team_members" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'first' in params:
            query_params.append(('first', params['first']))  # noqa: E501
        if 'max' in params:
            query_params.append(('max', params['max']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberModelPage',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def install_private_app(self, team_member_id, schema_id, **kwargs):  # noqa: E501
        """Installs private agent app for the given agent  # noqa: E501

        _in snippets: platform.api.teamMembers.installPrivateApp_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.install_private_app(team_member_id, schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int schema_id: (required)
        :param bool body:
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.install_private_app_with_http_info(team_member_id, schema_id, **kwargs)  # noqa: E501
        else:
            (data) = self.install_private_app_with_http_info(team_member_id, schema_id, **kwargs)  # noqa: E501
            return data

    def install_private_app_with_http_info(self, team_member_id, schema_id, **kwargs):  # noqa: E501
        """Installs private agent app for the given agent  # noqa: E501

        _in snippets: platform.api.teamMembers.installPrivateApp_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.install_private_app_with_http_info(team_member_id, schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int schema_id: (required)
        :param bool body:
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'schema_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method install_private_app" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `install_private_app`")  # noqa: E501
        # verify the required parameter 'schema_id' is set
        if ('schema_id' not in params or
                params['schema_id'] is None):
            raise ValueError("Missing the required parameter `schema_id` when calling `install_private_app`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'schema_id' in params:
            path_params['schemaId'] = params['schema_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/apps/{schemaId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[int]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def install_shared_app(self, schema_id, **kwargs):  # noqa: E501
        """Installs shared agent app for all agents  # noqa: E501

        _in snippets: platform.api.teamMembers.installSharedApp_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.install_shared_app(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: (required)
        :param bool body:
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.install_shared_app_with_http_info(schema_id, **kwargs)  # noqa: E501
        else:
            (data) = self.install_shared_app_with_http_info(schema_id, **kwargs)  # noqa: E501
            return data

    def install_shared_app_with_http_info(self, schema_id, **kwargs):  # noqa: E501
        """Installs shared agent app for all agents  # noqa: E501

        _in snippets: platform.api.teamMembers.installSharedApp_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.install_shared_app_with_http_info(schema_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int schema_id: (required)
        :param bool body:
        :return: list[int]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['schema_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method install_shared_app" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'schema_id' is set
        if ('schema_id' not in params or
                params['schema_id'] is None):
            raise ValueError("Missing the required parameter `schema_id` when calling `install_shared_app`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'schema_id' in params:
            path_params['schemaId'] = params['schema_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/apps/{schemaId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[int]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def set_org_channel_permission(self, team_member_id, org_channel_id, permission, **kwargs):  # noqa: E501
        """Sets a team member's orgChannel permission  # noqa: E501

        _in snippets: platform.api.teamMembers.setOrgChannelPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_org_channel_permission(team_member_id, org_channel_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :param str permission: (required)
        :param bool body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.set_org_channel_permission_with_http_info(team_member_id, org_channel_id, permission, **kwargs)  # noqa: E501
        else:
            (data) = self.set_org_channel_permission_with_http_info(team_member_id, org_channel_id, permission, **kwargs)  # noqa: E501
            return data

    def set_org_channel_permission_with_http_info(self, team_member_id, org_channel_id, permission, **kwargs):  # noqa: E501
        """Sets a team member's orgChannel permission  # noqa: E501

        _in snippets: platform.api.teamMembers.setOrgChannelPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_org_channel_permission_with_http_info(team_member_id, org_channel_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :param str permission: (required)
        :param bool body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'org_channel_id', 'permission', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method set_org_channel_permission" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `set_org_channel_permission`")  # noqa: E501
        # verify the required parameter 'org_channel_id' is set
        if ('org_channel_id' not in params or
                params['org_channel_id'] is None):
            raise ValueError("Missing the required parameter `org_channel_id` when calling `set_org_channel_permission`")  # noqa: E501
        # verify the required parameter 'permission' is set
        if ('permission' not in params or
                params['permission'] is None):
            raise ValueError("Missing the required parameter `permission` when calling `set_org_channel_permission`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501
        if 'permission' in params:
            path_params['permission'] = params['permission']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/org_channels/{orgChannelId}/permissions/{permission}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def set_org_channel_permissions1(self, team_member_id, org_channel_id, **kwargs):  # noqa: E501
        """Sets a team member's orgChannel permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.setOrgChannelPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_org_channel_permissions1(team_member_id, org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :param list[str] body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.set_org_channel_permissions1_with_http_info(team_member_id, org_channel_id, **kwargs)  # noqa: E501
        else:
            (data) = self.set_org_channel_permissions1_with_http_info(team_member_id, org_channel_id, **kwargs)  # noqa: E501
            return data

    def set_org_channel_permissions1_with_http_info(self, team_member_id, org_channel_id, **kwargs):  # noqa: E501
        """Sets a team member's orgChannel permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.setOrgChannelPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_org_channel_permissions1_with_http_info(team_member_id, org_channel_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param int org_channel_id: (required)
        :param list[str] body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'org_channel_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method set_org_channel_permissions1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `set_org_channel_permissions1`")  # noqa: E501
        # verify the required parameter 'org_channel_id' is set
        if ('org_channel_id' not in params or
                params['org_channel_id'] is None):
            raise ValueError("Missing the required parameter `org_channel_id` when calling `set_org_channel_permissions1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'org_channel_id' in params:
            path_params['orgChannelId'] = params['org_channel_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/org_channels/{orgChannelId}/permissions', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def set_permission(self, team_member_id, permission, **kwargs):  # noqa: E501
        """Sets a team member's permission  # noqa: E501

        _in snippets: platform.api.teamMembers.setPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_permission(team_member_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param str permission: (required)
        :param bool body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.set_permission_with_http_info(team_member_id, permission, **kwargs)  # noqa: E501
        else:
            (data) = self.set_permission_with_http_info(team_member_id, permission, **kwargs)  # noqa: E501
            return data

    def set_permission_with_http_info(self, team_member_id, permission, **kwargs):  # noqa: E501
        """Sets a team member's permission  # noqa: E501

        _in snippets: platform.api.teamMembers.setPermission_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_permission_with_http_info(team_member_id, permission, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param str permission: (required)
        :param bool body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'permission', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method set_permission" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `set_permission`")  # noqa: E501
        # verify the required parameter 'permission' is set
        if ('permission' not in params or
                params['permission'] is None):
            raise ValueError("Missing the required parameter `permission` when calling `set_permission`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501
        if 'permission' in params:
            path_params['permission'] = params['permission']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/permissions/{permission}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def set_permissions1(self, team_member_id, **kwargs):  # noqa: E501
        """Sets a team member's permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.setPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_permissions1(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param list[str] body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.set_permissions1_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.set_permissions1_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def set_permissions1_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Sets a team member's permissions  # noqa: E501

        _in snippets: platform.api.teamMembers.setPermissions_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_permissions1_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param list[str] body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method set_permissions1" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `set_permissions1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/permissions', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def set_team_member_notifications(self, team_member_id, **kwargs):  # noqa: E501
        """Sets a team member's notification settings  # noqa: E501

        _in snippets: platform.api.teamMembers.setTeamMemberNotifications_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_team_member_notifications(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param TeamMemberNotificationModel body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.set_team_member_notifications_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.set_team_member_notifications_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def set_team_member_notifications_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Sets a team member's notification settings  # noqa: E501

        _in snippets: platform.api.teamMembers.setTeamMemberNotifications_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_team_member_notifications_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param TeamMemberNotificationModel body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method set_team_member_notifications" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `set_team_member_notifications`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}/notifications', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_team_member(self, team_member_id, **kwargs):  # noqa: E501
        """Updates a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.updateTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_team_member(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param UpdateTeamMemberRequestModel body:
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_team_member_with_http_info(team_member_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_team_member_with_http_info(team_member_id, **kwargs)  # noqa: E501
            return data

    def update_team_member_with_http_info(self, team_member_id, **kwargs):  # noqa: E501
        """Updates a team member  # noqa: E501

        _in snippets: platform.api.teamMembers.updateTeamMember_  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_team_member_with_http_info(team_member_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int team_member_id: (required)
        :param UpdateTeamMemberRequestModel body:
        :return: TeamMemberModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_team_member" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_id' is set
        if ('team_member_id' not in params or
                params['team_member_id'] is None):
            raise ValueError("Missing the required parameter `team_member_id` when calling `update_team_member`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_member_id' in params:
            path_params['teamMemberId'] = params['team_member_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/{teamMemberId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberModel',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def upload_file_to_team_members(self, team_member_ids, **kwargs):  # noqa: E501
        """Upload a file for specific team member(s) to access  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_file_to_team_members(team_member_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[int] team_member_ids: The file to to upload. (required)
        :param str file:
        :return: TeamMemberFileModelPage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.upload_file_to_team_members_with_http_info(team_member_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.upload_file_to_team_members_with_http_info(team_member_ids, **kwargs)  # noqa: E501
            return data

    def upload_file_to_team_members_with_http_info(self, team_member_ids, **kwargs):  # noqa: E501
        """Upload a file for specific team member(s) to access  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_file_to_team_members_with_http_info(team_member_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[int] team_member_ids: The file to to upload. (required)
        :param str file:
        :return: TeamMemberFileModelPage
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['team_member_ids', 'file']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method upload_file_to_team_members" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'team_member_ids' is set
        if ('team_member_ids' not in params or
                params['team_member_ids'] is None):
            raise ValueError("Missing the required parameter `team_member_ids` when calling `upload_file_to_team_members`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'team_member_ids' in params:
            query_params.append(('teamMemberIds', params['team_member_ids']))  # noqa: E501
            collection_formats['teamMemberIds'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'file' in params:
            local_var_files['file'] = params['file']  # noqa: E501

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['org_token']  # noqa: E501

        return self.api_client.call_api(
            '/team_members/upload', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamMemberFileModelPage',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
