# coding: utf-8

"""
    Swagger Petstore

    This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: apiteam@swagger.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from petstore_api.api_client import ApiClient


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

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

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

    def fake_outer_boolean_serialize(self, **kwargs):  # noqa: E501
        """fake_outer_boolean_serialize  # noqa: E501

        Test serialization of outer boolean types  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_boolean_serialize(async_req=True)
        >>> result = thread.get()

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

    def fake_outer_boolean_serialize_with_http_info(self, **kwargs):  # noqa: E501
        """fake_outer_boolean_serialize  # noqa: E501

        Test serialization of outer boolean types  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_boolean_serialize_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OuterBoolean body: Input boolean as post body
        :return: OuterBoolean
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def fake_outer_composite_serialize(self, **kwargs):  # noqa: E501
        """fake_outer_composite_serialize  # noqa: E501

        Test serialization of object with outer number type  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_composite_serialize(async_req=True)
        >>> result = thread.get()

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

    def fake_outer_composite_serialize_with_http_info(self, **kwargs):  # noqa: E501
        """fake_outer_composite_serialize  # noqa: E501

        Test serialization of object with outer number type  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_composite_serialize_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OuterComposite body: Input composite as post body
        :return: OuterComposite
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def fake_outer_number_serialize(self, **kwargs):  # noqa: E501
        """fake_outer_number_serialize  # noqa: E501

        Test serialization of outer number types  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_number_serialize(async_req=True)
        >>> result = thread.get()

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

    def fake_outer_number_serialize_with_http_info(self, **kwargs):  # noqa: E501
        """fake_outer_number_serialize  # noqa: E501

        Test serialization of outer number types  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_number_serialize_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OuterNumber body: Input number as post body
        :return: OuterNumber
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def fake_outer_string_serialize(self, **kwargs):  # noqa: E501
        """fake_outer_string_serialize  # noqa: E501

        Test serialization of outer string types  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_string_serialize(async_req=True)
        >>> result = thread.get()

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

    def fake_outer_string_serialize_with_http_info(self, **kwargs):  # noqa: E501
        """fake_outer_string_serialize  # noqa: E501

        Test serialization of outer string types  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fake_outer_string_serialize_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OuterString body: Input string as post body
        :return: OuterString
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def test_body_with_query_params(self, body, query, **kwargs):  # noqa: E501
        """test_body_with_query_params  # noqa: E501

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

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

    def test_body_with_query_params_with_http_info(self, body, query, **kwargs):  # noqa: E501
        """test_body_with_query_params  # noqa: E501

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

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

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

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/fake/body-with-query-params', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def test_client_model(self, body, **kwargs):  # noqa: E501
        """To test \"client\" model  # noqa: E501

        To test \"client\" model  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_client_model(body, async_req=True)
        >>> result = thread.get()

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

    def test_client_model_with_http_info(self, body, **kwargs):  # noqa: E501
        """To test \"client\" model  # noqa: E501

        To test \"client\" model  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_client_model_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param Client body: client model (required)
        :return: Client
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs):  # noqa: E501
        """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트   # noqa: E501

        Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param float number: None (required)
        :param float double: None (required)
        :param str pattern_without_delimiter: None (required)
        :param str byte: None (required)
        :param int integer: None
        :param int int32: None
        :param int int64: None
        :param float _float: None
        :param str string: None
        :param str binary: None
        :param date _date: None
        :param datetime date_time: None
        :param str password: None
        :param str param_callback: None
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs)  # noqa: E501
        else:
            (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs)  # noqa: E501
            return data

    def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs):  # noqa: E501
        """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트   # noqa: E501

        Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param float number: None (required)
        :param float double: None (required)
        :param str pattern_without_delimiter: None (required)
        :param str byte: None (required)
        :param int integer: None
        :param int int32: None
        :param int int64: None
        :param float _float: None
        :param str string: None
        :param str binary: None
        :param date _date: None
        :param datetime date_time: None
        :param str password: None
        :param str param_callback: None
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['number', 'double', 'pattern_without_delimiter', 'byte', 'integer', 'int32', 'int64', '_float', 'string', 'binary', '_date', 'date_time', 'password', 'param_callback']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        if 'number' in params and params['number'] > 543.2:  # noqa: E501
            raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value less than or equal to `543.2`")  # noqa: E501
        if 'number' in params and params['number'] < 32.1:  # noqa: E501
            raise ValueError("Invalid value for parameter `number` when calling `test_endpoint_parameters`, must be a value greater than or equal to `32.1`")  # noqa: E501
        if 'double' in params and params['double'] > 123.4:  # noqa: E501
            raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`")  # noqa: E501
        if 'double' in params and params['double'] < 67.8:  # noqa: E501
            raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`")  # noqa: E501
        if 'pattern_without_delimiter' in params and not re.search(r'^[A-Z].*', params['pattern_without_delimiter']):  # noqa: E501
            raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`")  # noqa: E501
        if 'integer' in params and params['integer'] > 100:  # noqa: E501
            raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`")  # noqa: E501
        if 'integer' in params and params['integer'] < 10:  # noqa: E501
            raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value greater than or equal to `10`")  # noqa: E501
        if 'int32' in params and params['int32'] > 200:  # noqa: E501
            raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value less than or equal to `200`")  # noqa: E501
        if 'int32' in params and params['int32'] < 20:  # noqa: E501
            raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`")  # noqa: E501
        if '_float' in params and params['_float'] > 987.6:  # noqa: E501
            raise ValueError("Invalid value for parameter `_float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`")  # noqa: E501
        if 'string' in params and not re.search(r'[a-z]', params['string'], flags=re.IGNORECASE):  # noqa: E501
            raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`")  # noqa: E501
        if ('password' in params and
                len(params['password']) > 64):
            raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be less than or equal to `64`")  # noqa: E501
        if ('password' in params and
                len(params['password']) < 10):
            raise ValueError("Invalid value for parameter `password` when calling `test_endpoint_parameters`, length must be greater than or equal to `10`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'integer' in params:
            form_params.append(('integer', params['integer']))  # noqa: E501
        if 'int32' in params:
            form_params.append(('int32', params['int32']))  # noqa: E501
        if 'int64' in params:
            form_params.append(('int64', params['int64']))  # noqa: E501
        if 'number' in params:
            form_params.append(('number', params['number']))  # noqa: E501
        if '_float' in params:
            form_params.append(('float', params['_float']))  # noqa: E501
        if 'double' in params:
            form_params.append(('double', params['double']))  # noqa: E501
        if 'string' in params:
            form_params.append(('string', params['string']))  # noqa: E501
        if 'pattern_without_delimiter' in params:
            form_params.append(('pattern_without_delimiter', params['pattern_without_delimiter']))  # noqa: E501
        if 'byte' in params:
            form_params.append(('byte', params['byte']))  # noqa: E501
        if 'binary' in params:
            form_params.append(('binary', params['binary']))  # noqa: E501
        if '_date' in params:
            form_params.append(('date', params['_date']))  # noqa: E501
        if 'date_time' in params:
            form_params.append(('dateTime', params['date_time']))  # noqa: E501
        if 'password' in params:
            form_params.append(('password', params['password']))  # noqa: E501
        if 'param_callback' in params:
            form_params.append(('callback', params['param_callback']))  # noqa: E501

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/xml; charset=utf-8', 'application/json; charset=utf-8'])  # noqa: E501

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

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

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

    def test_enum_parameters(self, **kwargs):  # noqa: E501
        """To test enum parameters  # noqa: E501

        To test enum parameters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_enum_parameters(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] enum_form_string_array: Form parameter enum test (string array)
        :param str enum_form_string: Form parameter enum test (string)
        :param list[str] enum_header_string_array: Header parameter enum test (string array)
        :param str enum_header_string: Header parameter enum test (string)
        :param list[str] enum_query_string_array: Query parameter enum test (string array)
        :param str enum_query_string: Query parameter enum test (string)
        :param int enum_query_integer: Query parameter enum test (double)
        :param float enum_query_double: Query parameter enum test (double)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.test_enum_parameters_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.test_enum_parameters_with_http_info(**kwargs)  # noqa: E501
            return data

    def test_enum_parameters_with_http_info(self, **kwargs):  # noqa: E501
        """To test enum parameters  # noqa: E501

        To test enum parameters  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_enum_parameters_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] enum_form_string_array: Form parameter enum test (string array)
        :param str enum_form_string: Form parameter enum test (string)
        :param list[str] enum_header_string_array: Header parameter enum test (string array)
        :param str enum_header_string: Header parameter enum test (string)
        :param list[str] enum_query_string_array: Query parameter enum test (string array)
        :param str enum_query_string: Query parameter enum test (string)
        :param int enum_query_integer: Query parameter enum test (double)
        :param float enum_query_double: Query parameter enum test (double)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['enum_form_string_array', 'enum_form_string', 'enum_header_string_array', 'enum_header_string', 'enum_query_string_array', 'enum_query_string', 'enum_query_integer', 'enum_query_double']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'enum_query_string_array' in params:
            query_params.append(('enum_query_string_array', params['enum_query_string_array']))  # noqa: E501
            collection_formats['enum_query_string_array'] = 'csv'  # noqa: E501
        if 'enum_query_string' in params:
            query_params.append(('enum_query_string', params['enum_query_string']))  # noqa: E501
        if 'enum_query_integer' in params:
            query_params.append(('enum_query_integer', params['enum_query_integer']))  # noqa: E501

        header_params = {}
        if 'enum_header_string_array' in params:
            header_params['enum_header_string_array'] = params['enum_header_string_array']  # noqa: E501
            collection_formats['enum_header_string_array'] = 'csv'  # noqa: E501
        if 'enum_header_string' in params:
            header_params['enum_header_string'] = params['enum_header_string']  # noqa: E501

        form_params = []
        local_var_files = {}
        if 'enum_form_string_array' in params:
            form_params.append(('enum_form_string_array', params['enum_form_string_array']))  # noqa: E501
            collection_formats['enum_form_string_array'] = 'csv'  # noqa: E501
        if 'enum_form_string' in params:
            form_params.append(('enum_form_string', params['enum_form_string']))  # noqa: E501
        if 'enum_query_double' in params:
            form_params.append(('enum_query_double', params['enum_query_double']))  # noqa: E501

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def test_inline_additional_properties(self, param, **kwargs):  # noqa: E501
        """test inline additionalProperties  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_inline_additional_properties(param, async_req=True)
        >>> result = thread.get()

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

    def test_inline_additional_properties_with_http_info(self, param, **kwargs):  # noqa: E501
        """test inline additionalProperties  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_inline_additional_properties_with_http_info(param, async_req=True)
        >>> result = thread.get()

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

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

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

    def test_json_form_data(self, param, param2, **kwargs):  # noqa: E501
        """test json serialization of form data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_json_form_data(param, param2, async_req=True)
        >>> result = thread.get()

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

    def test_json_form_data_with_http_info(self, param, param2, **kwargs):  # noqa: E501
        """test json serialization of form data  # noqa: E501

          # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str param: field1 (required)
        :param str param2: field2 (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'param' in params:
            form_params.append(('param', params['param']))  # noqa: E501
        if 'param2' in params:
            form_params.append(('param2', params['param2']))  # noqa: E501

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

        # Authentication setting
        auth_settings = []  # noqa: E501

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