# coding: utf-8

"""
    Trackside Software TeamDB API v2.0

    This API enables you to access TeamDB data  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@trackside.fr
    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 teamdbapi.api_client import ApiClient


class TeamDBListApi(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 team_db_list_create_list_item(self, new_item, **kwargs):  # noqa: E501
        """Create a new TeamDB list item  # noqa: E501

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

        :param async_req bool
        :param TeamDBListItem new_item: The TeamDB list item to create. (required)
        :return: TeamDBListItem
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_create_list_item_with_http_info(new_item, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_create_list_item_with_http_info(new_item, **kwargs)  # noqa: E501
            return data

    def team_db_list_create_list_item_with_http_info(self, new_item, **kwargs):  # noqa: E501
        """Create a new TeamDB list item  # noqa: E501

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

        :param async_req bool
        :param TeamDBListItem new_item: The TeamDB list item to create. (required)
        :return: TeamDBListItem
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['new_item']  # 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 team_db_list_create_list_item" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'new_item' is set
        if self.api_client.client_side_validation and ('new_item' not in params or
                                                       params['new_item'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `new_item` when calling `team_db_list_create_list_item`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblistitem', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamDBListItem',  # 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 team_db_list_create_list(self, new_list, **kwargs):  # noqa: E501
        """Create a new TeamDB list  # noqa: E501

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

        :param async_req bool
        :param TeamDBList new_list: The TeamDB list to create. (required)
        :return: TeamDBList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_create_list_with_http_info(new_list, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_create_list_with_http_info(new_list, **kwargs)  # noqa: E501
            return data

    def team_db_list_create_list_with_http_info(self, new_list, **kwargs):  # noqa: E501
        """Create a new TeamDB list  # noqa: E501

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

        :param async_req bool
        :param TeamDBList new_list: The TeamDB list to create. (required)
        :return: TeamDBList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['new_list']  # 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 team_db_list_create_list" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'new_list' is set
        if self.api_client.client_side_validation and ('new_list' not in params or
                                                       params['new_list'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `new_list` when calling `team_db_list_create_list`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblist', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamDBList',  # 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 team_db_list_delete_list(self, list_id, **kwargs):  # noqa: E501
        """Delete an existing TeamDB list  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want to delete the list (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.team_db_list_delete_list_with_http_info(list_id, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_delete_list_with_http_info(list_id, **kwargs)  # noqa: E501
            return data

    def team_db_list_delete_list_with_http_info(self, list_id, **kwargs):  # noqa: E501
        """Delete an existing TeamDB list  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want to delete the list (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['list_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 team_db_list_delete_list" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'list_id' is set
        if self.api_client.client_side_validation and ('list_id' not in params or
                                                       params['list_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `list_id` when calling `team_db_list_delete_list`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'list_id' in params:
            path_params['listId'] = params['list_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', 'text/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblist/{listId}', '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 team_db_list_delete_list_item(self, item_id, **kwargs):  # noqa: E501
        """Delete an existing TeamDB list item  # noqa: E501

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

        :param async_req bool
        :param str item_id: The unique TeamDB list item id for which you want to delete the item (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.team_db_list_delete_list_item_with_http_info(item_id, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_delete_list_item_with_http_info(item_id, **kwargs)  # noqa: E501
            return data

    def team_db_list_delete_list_item_with_http_info(self, item_id, **kwargs):  # noqa: E501
        """Delete an existing TeamDB list item  # noqa: E501

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

        :param async_req bool
        :param str item_id: The unique TeamDB list item id for which you want to delete the item (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['item_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 team_db_list_delete_list_item" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'item_id' is set
        if self.api_client.client_side_validation and ('item_id' not in params or
                                                       params['item_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `item_id` when calling `team_db_list_delete_list_item`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'item_id' in params:
            path_params['itemId'] = params['item_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', 'text/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblistitem/{itemId}', '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 team_db_list_get_list_item(self, item_id, **kwargs):  # noqa: E501
        """Get a TeamDB list item via a unique id.  # noqa: E501

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

        :param async_req bool
        :param str item_id: The unique TeamDB list item id for which you want to get the item (required)
        :return: TeamDBListItem
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_get_list_item_with_http_info(item_id, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_get_list_item_with_http_info(item_id, **kwargs)  # noqa: E501
            return data

    def team_db_list_get_list_item_with_http_info(self, item_id, **kwargs):  # noqa: E501
        """Get a TeamDB list item via a unique id.  # noqa: E501

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

        :param async_req bool
        :param str item_id: The unique TeamDB list item id for which you want to get the item (required)
        :return: TeamDBListItem
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['item_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 team_db_list_get_list_item" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'item_id' is set
        if self.api_client.client_side_validation and ('item_id' not in params or
                                                       params['item_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `item_id` when calling `team_db_list_get_list_item`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'item_id' in params:
            path_params['itemId'] = params['item_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', 'text/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblistitem/{itemId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamDBListItem',  # 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 team_db_list_get_list_items(self, list_id, **kwargs):  # noqa: E501
        """Get the list of all items for a TeamDB list  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want the items (required)
        :return: list[TeamDBListItem]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_get_list_items_with_http_info(list_id, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_get_list_items_with_http_info(list_id, **kwargs)  # noqa: E501
            return data

    def team_db_list_get_list_items_with_http_info(self, list_id, **kwargs):  # noqa: E501
        """Get the list of all items for a TeamDB list  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want the items (required)
        :return: list[TeamDBListItem]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['list_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 team_db_list_get_list_items" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'list_id' is set
        if self.api_client.client_side_validation and ('list_id' not in params or
                                                       params['list_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `list_id` when calling `team_db_list_get_list_items`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'list_id' in params:
            path_params['listId'] = params['list_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', 'text/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblist/{listId}/items', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[TeamDBListItem]',  # 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 team_db_list_get_list(self, list_id, **kwargs):  # noqa: E501
        """Get a TeamDB list via a unique id.  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want to get the list (required)
        :return: TeamDBList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_get_list_with_http_info(list_id, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_get_list_with_http_info(list_id, **kwargs)  # noqa: E501
            return data

    def team_db_list_get_list_with_http_info(self, list_id, **kwargs):  # noqa: E501
        """Get a TeamDB list via a unique id.  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want to get the list (required)
        :return: TeamDBList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['list_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 team_db_list_get_list" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'list_id' is set
        if self.api_client.client_side_validation and ('list_id' not in params or
                                                       params['list_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `list_id` when calling `team_db_list_get_list`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'list_id' in params:
            path_params['listId'] = params['list_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', 'text/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblist/{listId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamDBList',  # 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 team_db_list_get_lists(self, **kwargs):  # noqa: E501
        """Get the list of all TeamDB lists  # noqa: E501

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

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

    def team_db_list_get_lists_with_http_info(self, **kwargs):  # noqa: E501
        """Get the list of all TeamDB lists  # noqa: E501

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

        :param async_req bool
        :return: list[TeamDBList]
                 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 team_db_list_get_lists" % 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', 'text/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblists', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[TeamDBList]',  # 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 team_db_list_update_list(self, list_id, updated_list, **kwargs):  # noqa: E501
        """Update an existing TeamDB list  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want to update the list (required)
        :param TeamDBList updated_list: The TeamDB list to update. (required)
        :return: TeamDBList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_update_list_with_http_info(list_id, updated_list, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_update_list_with_http_info(list_id, updated_list, **kwargs)  # noqa: E501
            return data

    def team_db_list_update_list_with_http_info(self, list_id, updated_list, **kwargs):  # noqa: E501
        """Update an existing TeamDB list  # noqa: E501

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

        :param async_req bool
        :param str list_id: The unique TeamDB list id for which you want to update the list (required)
        :param TeamDBList updated_list: The TeamDB list to update. (required)
        :return: TeamDBList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['list_id', 'updated_list']  # 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 team_db_list_update_list" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'list_id' is set
        if self.api_client.client_side_validation and ('list_id' not in params or
                                                       params['list_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `list_id` when calling `team_db_list_update_list`")  # noqa: E501
        # verify the required parameter 'updated_list' is set
        if self.api_client.client_side_validation and ('updated_list' not in params or
                                                       params['updated_list'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `updated_list` when calling `team_db_list_update_list`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'list_id' in params:
            path_params['listId'] = params['list_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblist/{listId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamDBList',  # 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 team_db_list_update_list_item(self, item_id, updated_list_item, **kwargs):  # noqa: E501
        """Update an existing TeamDB list item  # noqa: E501

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

        :param async_req bool
        :param str item_id: The unique TeamDB list item id for which you want to update the item (required)
        :param TeamDBListItem updated_list_item: The TeamDB list item to update. (required)
        :return: TeamDBListItem
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.team_db_list_update_list_item_with_http_info(item_id, updated_list_item, **kwargs)  # noqa: E501
        else:
            (data) = self.team_db_list_update_list_item_with_http_info(item_id, updated_list_item, **kwargs)  # noqa: E501
            return data

    def team_db_list_update_list_item_with_http_info(self, item_id, updated_list_item, **kwargs):  # noqa: E501
        """Update an existing TeamDB list item  # noqa: E501

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

        :param async_req bool
        :param str item_id: The unique TeamDB list item id for which you want to update the item (required)
        :param TeamDBListItem updated_list_item: The TeamDB list item to update. (required)
        :return: TeamDBListItem
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['item_id', 'updated_list_item']  # 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 team_db_list_update_list_item" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'item_id' is set
        if self.api_client.client_side_validation and ('item_id' not in params or
                                                       params['item_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `item_id` when calling `team_db_list_update_list_item`")  # noqa: E501
        # verify the required parameter 'updated_list_item' is set
        if self.api_client.client_side_validation and ('updated_list_item' not in params or
                                                       params['updated_list_item'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `updated_list_item` when calling `team_db_list_update_list_item`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'item_id' in params:
            path_params['itemId'] = params['item_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/teamdbapi/v2.0/teamdblistitem/{itemId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TeamDBListItem',  # 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)
