# coding: utf-8

"""
    tweak-api

    Tweak API to integrate with all the Tweak services.  You can find out more about Tweak      at <a href='https://www.tweak.com'>https://www.tweak.com</a>, #tweak.

    OpenAPI spec version: 1.0.8-beta.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class TeamBuilderConfigProductTypeApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def team_builder_config_product_types_change_stream_get(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_change_stream_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_change_stream_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_change_stream_get_with_http_info(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['options']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/change-stream'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'options' in params:
            query_params['options'] = params['options']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='file',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_change_stream_post(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_post(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_change_stream_post_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_change_stream_post_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_change_stream_post_with_http_info(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_post_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['options']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/change-stream'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'options' in params:
            form_params.append(('options', params['options']))

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='file',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_count_get(self, **kwargs):
        """
        Count instances of the model matched by where from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_count_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str where: Criteria to match model instances
        :return: InlineResponse2001
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_count_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_count_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_count_get_with_http_info(self, **kwargs):
        """
        Count instances of the model matched by where from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_count_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str where: Criteria to match model instances
        :return: InlineResponse2001
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['where']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/count'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'where' in params:
            query_params['where'] = params['where']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='InlineResponse2001',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_find_one_get(self, **kwargs):
        """
        Find first instance of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_find_one_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_find_one_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_find_one_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_find_one_get_with_http_info(self, **kwargs):
        """
        Find first instance of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_find_one_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['filter']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/findOne'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'filter' in params:
            query_params['filter'] = params['filter']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_get(self, **kwargs):
        """
        Find all instances of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: list[TeamBuilderConfigProductType]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_get_with_http_info(self, **kwargs):
        """
        Find all instances of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: list[TeamBuilderConfigProductType]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['filter']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'filter' in params:
            query_params['filter'] = params['filter']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[TeamBuilderConfigProductType]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_builder_config_get(self, id, **kwargs):
        """
        Fetches belongsTo relation builderConfig.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_builder_config_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: TeamBuilderConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_builder_config_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_builder_config_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_builder_config_get_with_http_info(self, id, **kwargs):
        """
        Fetches belongsTo relation builderConfig.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_builder_config_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: TeamBuilderConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'refresh']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/builderConfig'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'refresh' in params:
            query_params['refresh'] = params['refresh']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfig',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_delete(self, id, **kwargs):
        """
        Delete a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_delete(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_delete_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_delete_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_delete_with_http_info(self, id, **kwargs):
        """
        Delete a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_delete_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='object',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_exists_get(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_exists_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_exists_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_exists_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_exists_get_with_http_info(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_exists_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/exists'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='InlineResponse2002',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_get(self, id, **kwargs):
        """
        Find a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_get_with_http_info(self, id, **kwargs):
        """
        Find a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'filter']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'filter' in params:
            query_params['filter'] = params['filter']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_head(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_head(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_head_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_head_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_head_with_http_info(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_head_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'HEAD',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='InlineResponse2002',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_patch(self, id, **kwargs):
        """
        Patch attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_patch(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param TeamBuilderConfigProductType data: An object of model property name/value pairs
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_patch_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_patch_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_patch_with_http_info(self, id, **kwargs):
        """
        Patch attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_patch_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param TeamBuilderConfigProductType data: An object of model property name/value pairs
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'PATCH',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_product_type_get(self, id, **kwargs):
        """
        Fetches belongsTo relation productType.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_product_type_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: ProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_product_type_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_product_type_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_product_type_get_with_http_info(self, id, **kwargs):
        """
        Fetches belongsTo relation productType.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_product_type_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: ProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'refresh']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/productType'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'refresh' in params:
            query_params['refresh'] = params['refresh']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_put(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_put(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_put_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_put_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_put_with_http_info(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_put_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_replace_post(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_replace_post(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_replace_post_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_replace_post_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_replace_post_with_http_info(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_replace_post_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/replace'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_post(self, **kwargs):
        """
        Create a new instance of the model and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_post(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_post_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_post_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_post_with_http_info(self, **kwargs):
        """
        Create a new instance of the model and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_post_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

# coding: utf-8

"""
    tweak-api

    Tweak API to integrate with all the Tweak services.  You can find out more about Tweak      at <a href='https://www.tweak.com'>https://www.tweak.com</a>, #tweak.

    OpenAPI spec version: 1.0.8-beta.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class TeamBuilderConfigProductTypeApi(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):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def team_builder_config_product_types_change_stream_get(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_change_stream_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_change_stream_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_change_stream_get_with_http_info(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['options']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/change-stream'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'options' in params:
            query_params['options'] = params['options']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='file',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_change_stream_post(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_post(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_change_stream_post_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_change_stream_post_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_change_stream_post_with_http_info(self, **kwargs):
        """
        Create a change stream.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_change_stream_post_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str options: 
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['options']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/change-stream'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'options' in params:
            form_params.append(('options', params['options']))

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='file',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_count_get(self, **kwargs):
        """
        Count instances of the model matched by where from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_count_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str where: Criteria to match model instances
        :return: InlineResponse2001
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_count_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_count_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_count_get_with_http_info(self, **kwargs):
        """
        Count instances of the model matched by where from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_count_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str where: Criteria to match model instances
        :return: InlineResponse2001
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['where']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/count'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'where' in params:
            query_params['where'] = params['where']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='InlineResponse2001',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_find_one_get(self, **kwargs):
        """
        Find first instance of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_find_one_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_find_one_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_find_one_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_find_one_get_with_http_info(self, **kwargs):
        """
        Find first instance of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_find_one_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['filter']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/findOne'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'filter' in params:
            query_params['filter'] = params['filter']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_get(self, **kwargs):
        """
        Find all instances of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_get(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: list[TeamBuilderConfigProductType]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_get_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_get_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_get_with_http_info(self, **kwargs):
        """
        Find all instances of the model matched by filter from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_get_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: list[TeamBuilderConfigProductType]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['filter']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes'.replace('{format}', 'json')
        path_params = {}

        query_params = {}
        if 'filter' in params:
            query_params['filter'] = params['filter']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[TeamBuilderConfigProductType]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_builder_config_get(self, id, **kwargs):
        """
        Fetches belongsTo relation builderConfig.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_builder_config_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: TeamBuilderConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_builder_config_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_builder_config_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_builder_config_get_with_http_info(self, id, **kwargs):
        """
        Fetches belongsTo relation builderConfig.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_builder_config_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: TeamBuilderConfig
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'refresh']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/builderConfig'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'refresh' in params:
            query_params['refresh'] = params['refresh']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfig',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_delete(self, id, **kwargs):
        """
        Delete a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_delete(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_delete_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_delete_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_delete_with_http_info(self, id, **kwargs):
        """
        Delete a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_delete_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='object',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_exists_get(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_exists_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_exists_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_exists_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_exists_get_with_http_info(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_exists_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/exists'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='InlineResponse2002',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_get(self, id, **kwargs):
        """
        Find a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_get_with_http_info(self, id, **kwargs):
        """
        Find a model instance by {{id}} from the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'filter']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'filter' in params:
            query_params['filter'] = params['filter']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_head(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_head(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_head_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_head_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_head_with_http_info(self, id, **kwargs):
        """
        Check whether a model instance exists in the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_head_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :return: InlineResponse2002
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        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', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'HEAD',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='InlineResponse2002',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_patch(self, id, **kwargs):
        """
        Patch attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_patch(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param TeamBuilderConfigProductType data: An object of model property name/value pairs
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_patch_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_patch_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_patch_with_http_info(self, id, **kwargs):
        """
        Patch attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_patch_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param TeamBuilderConfigProductType data: An object of model property name/value pairs
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'PATCH',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_product_type_get(self, id, **kwargs):
        """
        Fetches belongsTo relation productType.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_product_type_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: ProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_product_type_get_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_product_type_get_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_product_type_get_with_http_info(self, id, **kwargs):
        """
        Fetches belongsTo relation productType.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_product_type_get_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: TeamBuilderConfigProductType id (required)
        :param bool refresh: 
        :return: ProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'refresh']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/productType'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'refresh' in params:
            query_params['refresh'] = params['refresh']

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='ProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_put(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_put(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_put_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_put_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_put_with_http_info(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_put_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_id_replace_post(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_replace_post(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_id_replace_post_with_http_info(id, **kwargs)
        else:
            (data) = self.team_builder_config_product_types_id_replace_post_with_http_info(id, **kwargs)
            return data

    def team_builder_config_product_types_id_replace_post_with_http_info(self, id, **kwargs):
        """
        Replace attributes for a model instance and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_id_replace_post_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str id: Model id (required)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes/{id}/replace'.replace('{format}', 'json')
        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

    def team_builder_config_product_types_post(self, **kwargs):
        """
        Create a new instance of the model and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_post(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.team_builder_config_product_types_post_with_http_info(**kwargs)
        else:
            (data) = self.team_builder_config_product_types_post_with_http_info(**kwargs)
            return data

    def team_builder_config_product_types_post_with_http_info(self, **kwargs):
        """
        Create a new instance of the model and persist it into the data source.
        

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.team_builder_config_product_types_post_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param TeamBuilderConfigProductType data: Model instance data
        :return: TeamBuilderConfigProductType
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['data']
        all_params.append('callback')
        all_params.append('_return_http_data_only')

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


        collection_formats = {}

        resource_path = '/TeamBuilderConfigProductTypes'.replace('{format}', 'json')
        path_params = {}

        query_params = {}

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data' in params:
            body_params = params['data']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'])

        # Authentication setting
        auth_settings = ['access_token']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='TeamBuilderConfigProductType',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'),
                                            _return_http_data_only=params.get('_return_http_data_only'),
                                            collection_formats=collection_formats)

# coding: utf-8 tweak-api      Tweak API to integrate with all the Tweak services.  You can find out more about Tweak      at <a href='https://www.tweak.com'>https://www.tweak.com</a>, #tweak.      OpenAPI spec version: 1.0.8-beta.0          Generated by: https://github.com/swagger-api/swagger-codegen.git      Licensed under the Apache License, Version 2.0 (the "License");     you may not use this file except in compliance with the License.     You may obtain a copy of the License at          http://www.apache.org/licenses/LICENSE-2.0      Unless required by applicable law or agreed to in writing, software     distributed under the License is distributed on an "AS IS" BASIS,     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.     See the License for the specific language governing permissions and     limitations under the License. # python 2 and python 3 compatibility library 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 Create a change stream.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_change_stream_get(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str options:          :return: file                  If the method is called asynchronously,                  returns the request thread. Create a change stream.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_change_stream_get_with_http_info(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str options:          :return: file                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Create a change stream.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_change_stream_post(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str options:          :return: file                  If the method is called asynchronously,                  returns the request thread. Create a change stream.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_change_stream_post_with_http_info(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str options:          :return: file                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Count instances of the model matched by where from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_count_get(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str where: Criteria to match model instances         :return: InlineResponse2001                  If the method is called asynchronously,                  returns the request thread. Count instances of the model matched by where from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_count_get_with_http_info(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str where: Criteria to match model instances         :return: InlineResponse2001                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Find first instance of the model matched by filter from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_find_one_get(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. Find first instance of the model matched by filter from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_find_one_get_with_http_info(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Find all instances of the model matched by filter from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_get(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})         :return: list[TeamBuilderConfigProductType]                  If the method is called asynchronously,                  returns the request thread. Find all instances of the model matched by filter from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_get_with_http_info(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str filter: Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})         :return: list[TeamBuilderConfigProductType]                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Fetches belongsTo relation builderConfig.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_builder_config_get(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: TeamBuilderConfigProductType id (required)         :param bool refresh:          :return: TeamBuilderConfig                  If the method is called asynchronously,                  returns the request thread. Fetches belongsTo relation builderConfig.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_builder_config_get_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: TeamBuilderConfigProductType id (required)         :param bool refresh:          :return: TeamBuilderConfig                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Delete a model instance by {{id}} from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_delete(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :return: object                  If the method is called asynchronously,                  returns the request thread. Delete a model instance by {{id}} from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_delete_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :return: object                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Check whether a model instance exists in the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_exists_get(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :return: InlineResponse2002                  If the method is called asynchronously,                  returns the request thread. Check whether a model instance exists in the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_exists_get_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :return: InlineResponse2002                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Find a model instance by {{id}} from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_get(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. Find a model instance by {{id}} from the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_get_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :param str filter: Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Check whether a model instance exists in the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_head(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :return: InlineResponse2002                  If the method is called asynchronously,                  returns the request thread. Check whether a model instance exists in the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_head_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :return: InlineResponse2002                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Patch attributes for a model instance and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_patch(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: TeamBuilderConfigProductType id (required)         :param TeamBuilderConfigProductType data: An object of model property name/value pairs         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. Patch attributes for a model instance and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_patch_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: TeamBuilderConfigProductType id (required)         :param TeamBuilderConfigProductType data: An object of model property name/value pairs         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Fetches belongsTo relation productType.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_product_type_get(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: TeamBuilderConfigProductType id (required)         :param bool refresh:          :return: ProductType                  If the method is called asynchronously,                  returns the request thread. Fetches belongsTo relation productType.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_product_type_get_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: TeamBuilderConfigProductType id (required)         :param bool refresh:          :return: ProductType                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Replace attributes for a model instance and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_put(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :param TeamBuilderConfigProductType data: Model instance data         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. Replace attributes for a model instance and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_put_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :param TeamBuilderConfigProductType data: Model instance data         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Replace attributes for a model instance and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_replace_post(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :param TeamBuilderConfigProductType data: Model instance data         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. Replace attributes for a model instance and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_id_replace_post_with_http_info(id, callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param str id: Model id (required)         :param TeamBuilderConfigProductType data: Model instance data         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. # verify the required parameter 'id' is set # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting Create a new instance of the model and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_post(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param TeamBuilderConfigProductType data: Model instance data         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. Create a new instance of the model and persist it into the data source.                   This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please define a `callback` function         to be invoked when receiving the response.         >>> def callback_function(response):         >>>     pprint(response)         >>>         >>> thread = api.team_builder_config_product_types_post_with_http_info(callback=callback_function)          :param callback function: The callback function             for asynchronous request. (optional)         :param TeamBuilderConfigProductType data: Model instance data         :return: TeamBuilderConfigProductType                  If the method is called asynchronously,                  returns the request thread. # HTTP header `Accept` # HTTP header `Content-Type` # Authentication setting