def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __delete_order(self, order_id, **kwargs): """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_order(order_id, async_req=True) >>> result = thread.get() Args: order_id (str): ID of the order that needs to be deleted Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['order_id'] = \ order_id return self.call_with_http_info(**kwargs) self.delete_order = Endpoint(settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'delete_order', 'http_method': 'DELETE', 'servers': [], }, params_map={ 'all': [ 'order_id', ], 'required': [ 'order_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'order_id': (str, ), }, 'attribute_map': { 'order_id': 'order_id', }, 'location_map': { 'order_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__delete_order) def __get_inventory(self, **kwargs): """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_inventory(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: {str: (int,)} If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.get_inventory = Endpoint(settings={ 'response_type': ({ str: (int, ) }, ), 'auth': ['api_key'], 'endpoint_path': '/store/inventory', 'operation_id': 'get_inventory', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [], 'required': [], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': {}, 'attribute_map': {}, 'location_map': {}, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json'], 'content_type': [], }, api_client=api_client, callable=__get_inventory) def __get_order_by_id(self, order_id, **kwargs): """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_order_by_id(order_id, async_req=True) >>> result = thread.get() Args: order_id (int): ID of pet that needs to be fetched Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: order.Order If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['order_id'] = \ order_id return self.call_with_http_info(**kwargs) self.get_order_by_id = Endpoint( settings={ 'response_type': (order.Order, ), 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'get_order_by_id', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'order_id', ], 'required': [ 'order_id', ], 'nullable': [], 'enum': [], 'validation': [ 'order_id', ] }, root_map={ 'validations': { ('order_id', ): { 'inclusive_maximum': 5, 'inclusive_minimum': 1, }, }, 'allowed_values': {}, 'openapi_types': { 'order_id': (int, ), }, 'attribute_map': { 'order_id': 'order_id', }, 'location_map': { 'order_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client, callable=__get_order_by_id) def __place_order(self, order_order, **kwargs): """Place an order for a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.place_order(order_order, async_req=True) >>> result = thread.get() Args: order_order (order.Order): order placed for purchasing the pet Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: order.Order If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['order_order'] = \ order_order return self.call_with_http_info(**kwargs) self.place_order = Endpoint( settings={ 'response_type': (order.Order, ), 'auth': [], 'endpoint_path': '/store/order', 'operation_id': 'place_order', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'order_order', ], 'required': [ 'order_order', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'order_order': (order.Order, ), }, 'attribute_map': {}, 'location_map': { 'order_order': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': ['application/json'] }, api_client=api_client, callable=__place_order)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __add_pet(self, body, **kwargs): # noqa: E501 """Add a new pet to the store # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_pet(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param pet.Pet body: Pet object that needs to be added to the store (required) :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.add_pet = Endpoint(settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet', 'operation_id': 'add_pet', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'body': (pet.Pet, ), }, 'attribute_map': {}, 'location_map': { 'body': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/json', 'application/xml'] }, api_client=api_client, callable=__add_pet) def __delete_pet(self, pet_id, **kwargs): # noqa: E501 """Deletes a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_pet(pet_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param int pet_id: Pet id to delete (required) :param str api_key: :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) self.delete_pet = Endpoint(settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'delete_pet', 'http_method': 'DELETE', 'servers': [], }, params_map={ 'all': [ 'pet_id', 'api_key', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'api_key': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'api_key': 'api_key', }, 'location_map': { 'pet_id': 'path', 'api_key': 'header', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__delete_pet) def __find_pets_by_status(self, status, **kwargs): # noqa: E501 """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_pets_by_status(status, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param [str] status: Status values that need to be considered for filter (required) :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: [pet.Pet] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['status'] = status return self.call_with_http_info(**kwargs) self.find_pets_by_status = Endpoint( settings={ 'response_type': ([pet.Pet], ), 'auth': ['petstore_auth'], 'endpoint_path': '/pet/findByStatus', 'operation_id': 'find_pets_by_status', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'status', ], 'required': [ 'status', ], 'nullable': [], 'enum': [ 'status', ], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': { ('status', ): { "AVAILABLE": "available", "PENDING": "pending", "SOLD": "sold" }, }, 'openapi_types': { 'status': ([str], ), }, 'attribute_map': { 'status': 'status', }, 'location_map': { 'status': 'query', }, 'collection_format_map': { 'status': 'csv', } }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client, callable=__find_pets_by_status) def __find_pets_by_tags(self, tags, **kwargs): # noqa: E501 """Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_pets_by_tags(tags, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param [str] tags: Tags to filter by (required) :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: [pet.Pet] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['tags'] = tags return self.call_with_http_info(**kwargs) self.find_pets_by_tags = Endpoint( settings={ 'response_type': ([pet.Pet], ), 'auth': ['petstore_auth'], 'endpoint_path': '/pet/findByTags', 'operation_id': 'find_pets_by_tags', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'tags', ], 'required': [ 'tags', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'tags': ([str], ), }, 'attribute_map': { 'tags': 'tags', }, 'location_map': { 'tags': 'query', }, 'collection_format_map': { 'tags': 'csv', } }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client, callable=__find_pets_by_tags) def __get_pet_by_id(self, pet_id, **kwargs): # noqa: E501 """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pet_by_id(pet_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param int pet_id: ID of pet to return (required) :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: pet.Pet If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) self.get_pet_by_id = Endpoint( settings={ 'response_type': (pet.Pet, ), 'auth': ['api_key'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'get_pet_by_id', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'pet_id', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), }, 'attribute_map': { 'pet_id': 'petId', }, 'location_map': { 'pet_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client, callable=__get_pet_by_id) def __update_pet(self, body, **kwargs): # noqa: E501 """Update an existing pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_pet(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param pet.Pet body: Pet object that needs to be added to the store (required) :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.update_pet = Endpoint(settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet', 'operation_id': 'update_pet', 'http_method': 'PUT', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'body': (pet.Pet, ), }, 'attribute_map': {}, 'location_map': { 'body': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/json', 'application/xml'] }, api_client=api_client, callable=__update_pet) def __update_pet_with_form(self, pet_id, **kwargs): # noqa: E501 """Updates a pet in the store with form data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_pet_with_form(pet_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param int pet_id: ID of pet that needs to be updated (required) :param str name: Updated name of the pet :param str status: Updated status of the pet :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) self.update_pet_with_form = Endpoint( settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'update_pet_with_form', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'pet_id', 'name', 'status', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'name': (str, ), 'status': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'name': 'name', 'status': 'status', }, 'location_map': { 'pet_id': 'path', 'name': 'form', 'status': 'form', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/x-www-form-urlencoded'] }, api_client=api_client, callable=__update_pet_with_form) def __upload_file(self, pet_id, **kwargs): # noqa: E501 """uploads an image # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upload_file(pet_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param int pet_id: ID of pet to update (required) :param str additional_metadata: Additional data to pass to server :param file_type file: file to upload :param [file_type] files: files to upload :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: api_response.ApiResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id return self.call_with_http_info(**kwargs) self.upload_file = Endpoint(settings={ 'response_type': (api_response.ApiResponse, ), 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}/uploadImage', 'operation_id': 'upload_file', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'pet_id', 'additional_metadata', 'file', 'files', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'additional_metadata': (str, ), 'file': (file_type, ), 'files': ([file_type], ), }, 'attribute_map': { 'pet_id': 'petId', 'additional_metadata': 'additionalMetadata', 'file': 'file', 'files': 'files', }, 'location_map': { 'pet_id': 'path', 'additional_metadata': 'form', 'file': 'form', 'files': 'form', }, 'collection_format_map': { 'files': 'csv', } }, headers_map={ 'accept': ['application/json'], 'content_type': ['multipart/form-data'] }, api_client=api_client, callable=__upload_file) def __upload_file_with_required_file(self, pet_id, required_file, **kwargs): # noqa: E501 """uploads an image (required) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param int pet_id: ID of pet to update (required) :param file_type required_file: file to upload (required) :param str additional_metadata: Additional data to pass to server :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: api_response.ApiResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['pet_id'] = pet_id kwargs['required_file'] = required_file return self.call_with_http_info(**kwargs) self.upload_file_with_required_file = Endpoint( settings={ 'response_type': (api_response.ApiResponse, ), 'auth': ['petstore_auth'], 'endpoint_path': '/fake/{petId}/uploadImageWithRequiredFile', 'operation_id': 'upload_file_with_required_file', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'pet_id', 'required_file', 'additional_metadata', ], 'required': [ 'pet_id', 'required_file', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'required_file': (file_type, ), 'additional_metadata': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'required_file': 'requiredFile', 'additional_metadata': 'additionalMetadata', }, 'location_map': { 'pet_id': 'path', 'required_file': 'form', 'additional_metadata': 'form', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json'], 'content_type': ['multipart/form-data'] }, api_client=api_client, callable=__upload_file_with_required_file)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __add_pet( self, pet, **kwargs ): """Add a new pet to the store # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_pet(pet, async_req=True) >>> result = thread.get() Args: pet (Pet): Pet object that needs to be added to the store Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['pet'] = \ pet return self.call_with_http_info(**kwargs) self.add_pet = _Endpoint( settings={ 'response_type': None, 'auth': [ 'http_signature_test', 'petstore_auth' ], 'endpoint_path': '/pet', 'operation_id': 'add_pet', 'http_method': 'POST', 'servers': [ { 'url': "http://petstore.swagger.io/v2", 'description': "No description provided", }, { 'url': "http://path-server-test.petstore.local/v2", 'description': "No description provided", }, ] }, params_map={ 'all': [ 'pet', ], 'required': [ 'pet', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'pet': (Pet,), }, 'attribute_map': { }, 'location_map': { 'pet': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/json', 'application/xml' ] }, api_client=api_client, callable=__add_pet ) def __delete_pet( self, pet_id, **kwargs ): """Deletes a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_pet(pet_id, async_req=True) >>> result = thread.get() Args: pet_id (int): Pet id to delete Keyword Args: api_key (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['pet_id'] = \ pet_id return self.call_with_http_info(**kwargs) self.delete_pet = _Endpoint( settings={ 'response_type': None, 'auth': [ 'petstore_auth' ], 'endpoint_path': '/pet/{petId}', 'operation_id': 'delete_pet', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'api_key', ], 'required': [ 'pet_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'pet_id': (int,), 'api_key': (str,), }, 'attribute_map': { 'pet_id': 'petId', 'api_key': 'api_key', }, 'location_map': { 'pet_id': 'path', 'api_key': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__delete_pet ) def __find_pets_by_status( self, status, **kwargs ): """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_pets_by_status(status, async_req=True) >>> result = thread.get() Args: status ([str]): Status values that need to be considered for filter Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [Pet] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['status'] = \ status return self.call_with_http_info(**kwargs) self.find_pets_by_status = _Endpoint( settings={ 'response_type': ([Pet],), 'auth': [ 'http_signature_test', 'petstore_auth' ], 'endpoint_path': '/pet/findByStatus', 'operation_id': 'find_pets_by_status', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'status', ], 'required': [ 'status', ], 'nullable': [ ], 'enum': [ 'status', ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { ('status',): { "AVAILABLE": "available", "PENDING": "pending", "SOLD": "sold" }, }, 'openapi_types': { 'status': ([str],), }, 'attribute_map': { 'status': 'status', }, 'location_map': { 'status': 'query', }, 'collection_format_map': { 'status': 'csv', } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__find_pets_by_status ) def __find_pets_by_tags( self, tags, **kwargs ): """Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.find_pets_by_tags(tags, async_req=True) >>> result = thread.get() Args: tags ([str]): Tags to filter by Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [Pet] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['tags'] = \ tags return self.call_with_http_info(**kwargs) self.find_pets_by_tags = _Endpoint( settings={ 'response_type': ([Pet],), 'auth': [ 'http_signature_test', 'petstore_auth' ], 'endpoint_path': '/pet/findByTags', 'operation_id': 'find_pets_by_tags', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'tags', ], 'required': [ 'tags', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'tags': ([str],), }, 'attribute_map': { 'tags': 'tags', }, 'location_map': { 'tags': 'query', }, 'collection_format_map': { 'tags': 'csv', } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__find_pets_by_tags ) def __get_pet_by_id( self, pet_id, **kwargs ): """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pet_by_id(pet_id, async_req=True) >>> result = thread.get() Args: pet_id (int): ID of pet to return Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Pet If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['pet_id'] = \ pet_id return self.call_with_http_info(**kwargs) self.get_pet_by_id = _Endpoint( settings={ 'response_type': (Pet,), 'auth': [ 'api_key' ], 'endpoint_path': '/pet/{petId}', 'operation_id': 'get_pet_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'pet_id', ], 'required': [ 'pet_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'pet_id': (int,), }, 'attribute_map': { 'pet_id': 'petId', }, 'location_map': { 'pet_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_pet_by_id ) def __update_pet( self, pet, **kwargs ): """Update an existing pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_pet(pet, async_req=True) >>> result = thread.get() Args: pet (Pet): Pet object that needs to be added to the store Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['pet'] = \ pet return self.call_with_http_info(**kwargs) self.update_pet = _Endpoint( settings={ 'response_type': None, 'auth': [ 'http_signature_test', 'petstore_auth' ], 'endpoint_path': '/pet', 'operation_id': 'update_pet', 'http_method': 'PUT', 'servers': [ { 'url': "http://petstore.swagger.io/v2", 'description': "No description provided", }, { 'url': "http://path-server-test.petstore.local/v2", 'description': "No description provided", }, ] }, params_map={ 'all': [ 'pet', ], 'required': [ 'pet', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'pet': (Pet,), }, 'attribute_map': { }, 'location_map': { 'pet': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/json', 'application/xml' ] }, api_client=api_client, callable=__update_pet ) def __update_pet_with_form( self, pet_id, **kwargs ): """Updates a pet in the store with form data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_pet_with_form(pet_id, async_req=True) >>> result = thread.get() Args: pet_id (int): ID of pet that needs to be updated Keyword Args: name (str): Updated name of the pet. [optional] status (str): Updated status of the pet. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['pet_id'] = \ pet_id return self.call_with_http_info(**kwargs) self.update_pet_with_form = _Endpoint( settings={ 'response_type': None, 'auth': [ 'petstore_auth' ], 'endpoint_path': '/pet/{petId}', 'operation_id': 'update_pet_with_form', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'name', 'status', ], 'required': [ 'pet_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'pet_id': (int,), 'name': (str,), 'status': (str,), }, 'attribute_map': { 'pet_id': 'petId', 'name': 'name', 'status': 'status', }, 'location_map': { 'pet_id': 'path', 'name': 'form', 'status': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__update_pet_with_form )
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __call_123_test_special_tags(self, client_client, **kwargs): """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.call_123_test_special_tags(client_client, async_req=True) >>> result = thread.get() Args: client_client (client.Client): client model Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: client.Client If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['client_client'] = \ client_client return self.call_with_http_info(**kwargs) self.call_123_test_special_tags = Endpoint( settings={ 'response_type': (client.Client, ), 'auth': [], 'endpoint_path': '/another-fake/dummy', 'operation_id': 'call_123_test_special_tags', 'http_method': 'PATCH', 'servers': [], }, params_map={ 'all': [ 'client_client', ], 'required': [ 'client_client', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'client_client': (client.Client, ), }, 'attribute_map': {}, 'location_map': { 'client_client': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json'], 'content_type': ['application/json'] }, api_client=api_client, callable=__call_123_test_special_tags)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client self.add_pet_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet', 'operation_id': 'add_pet', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'body': (Pet, ), }, 'attribute_map': {}, 'location_map': { 'body': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/json', 'application/xml'] }, api_client=api_client) self.delete_pet_endpoint = _Endpoint(settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'delete_pet', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'api_key', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'api_key': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'api_key': 'api_key', }, 'location_map': { 'pet_id': 'path', 'api_key': 'header', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client) self.find_pets_by_status_endpoint = _Endpoint( settings={ 'response_type': ([Pet], ), 'auth': ['petstore_auth'], 'endpoint_path': '/pet/findByStatus', 'operation_id': 'find_pets_by_status', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'status', ], 'required': [ 'status', ], 'nullable': [], 'enum': [ 'status', ], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': { ('status', ): { "AVAILABLE": "available", "PENDING": "pending", "SOLD": "sold" }, }, 'openapi_types': { 'status': ([str], ), }, 'attribute_map': { 'status': 'status', }, 'location_map': { 'status': 'query', }, 'collection_format_map': { 'status': 'csv', } }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client) self.find_pets_by_tags_endpoint = _Endpoint( settings={ 'response_type': ([Pet], ), 'auth': ['petstore_auth'], 'endpoint_path': '/pet/findByTags', 'operation_id': 'find_pets_by_tags', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'tags', ], 'required': [ 'tags', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'tags': ([str], ), }, 'attribute_map': { 'tags': 'tags', }, 'location_map': { 'tags': 'query', }, 'collection_format_map': { 'tags': 'csv', } }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client) self.get_pet_by_id_endpoint = _Endpoint( settings={ 'response_type': (Pet, ), 'auth': ['api_key'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'get_pet_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'pet_id', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), }, 'attribute_map': { 'pet_id': 'petId', }, 'location_map': { 'pet_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client) self.update_pet_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet', 'operation_id': 'update_pet', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'body': (Pet, ), }, 'attribute_map': {}, 'location_map': { 'body': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/json', 'application/xml'] }, api_client=api_client) self.update_pet_with_form_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'update_pet_with_form', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'name', 'status', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'name': (str, ), 'status': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'name': 'name', 'status': 'status', }, 'location_map': { 'pet_id': 'path', 'name': 'form', 'status': 'form', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/x-www-form-urlencoded'] }, api_client=api_client) self.upload_file_endpoint = _Endpoint(settings={ 'response_type': (ApiResponse, ), 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}/uploadImage', 'operation_id': 'upload_file', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'additional_metadata', 'file', 'files', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'additional_metadata': (str, ), 'file': (file_type, ), 'files': ([file_type], ), }, 'attribute_map': { 'pet_id': 'petId', 'additional_metadata': 'additionalMetadata', 'file': 'file', 'files': 'files', }, 'location_map': { 'pet_id': 'path', 'additional_metadata': 'form', 'file': 'form', 'files': 'form', }, 'collection_format_map': { 'files': 'csv', } }, headers_map={ 'accept': ['application/json'], 'content_type': ['multipart/form-data'] }, api_client=api_client) self.upload_file_with_required_file_endpoint = _Endpoint( settings={ 'response_type': (ApiResponse, ), 'auth': ['petstore_auth'], 'endpoint_path': '/fake/{petId}/uploadImageWithRequiredFile', 'operation_id': 'upload_file_with_required_file', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'required_file', 'additional_metadata', ], 'required': [ 'pet_id', 'required_file', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'required_file': (file_type, ), 'additional_metadata': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'required_file': 'requiredFile', 'additional_metadata': 'additionalMetadata', }, 'location_map': { 'pet_id': 'path', 'required_file': 'form', 'additional_metadata': 'form', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json'], 'content_type': ['multipart/form-data'] }, api_client=api_client)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __create_user( self, body, **kwargs ): """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_user(body, async_req=True) >>> result = thread.get() Args: body (user.User): Created user object Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.create_user = Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user', 'operation_id': 'create_user', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'body': (user.User,), }, 'attribute_map': { }, 'location_map': { 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__create_user ) def __create_users_with_array_input( self, body, **kwargs ): """Creates list of users with given input array # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_users_with_array_input(body, async_req=True) >>> result = thread.get() Args: body ([user.User]): List of user object Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.create_users_with_array_input = Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/createWithArray', 'operation_id': 'create_users_with_array_input', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'body': ([user.User],), }, 'attribute_map': { }, 'location_map': { 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__create_users_with_array_input ) def __create_users_with_list_input( self, body, **kwargs ): """Creates list of users with given input array # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_users_with_list_input(body, async_req=True) >>> result = thread.get() Args: body ([user.User]): List of user object Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.create_users_with_list_input = Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/createWithList', 'operation_id': 'create_users_with_list_input', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'body': ([user.User],), }, 'attribute_map': { }, 'location_map': { 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__create_users_with_list_input ) def __delete_user( self, username, **kwargs ): """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_user(username, async_req=True) >>> result = thread.get() Args: username (str): The name that needs to be deleted Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = \ username return self.call_with_http_info(**kwargs) self.delete_user = Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'delete_user', 'http_method': 'DELETE', 'servers': [], }, params_map={ 'all': [ 'username', ], 'required': [ 'username', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), }, 'attribute_map': { 'username': '******', }, 'location_map': { 'username': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__delete_user ) def __get_user_by_name( self, username, **kwargs ): """Get user by user name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_by_name(username, async_req=True) >>> result = thread.get() Args: username (str): The name that needs to be fetched. Use user1 for testing. Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: user.User If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = \ username return self.call_with_http_info(**kwargs) self.get_user_by_name = Endpoint( settings={ 'response_type': (user.User,), 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'get_user_by_name', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'username', ], 'required': [ 'username', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), }, 'attribute_map': { 'username': '******', }, 'location_map': { 'username': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_user_by_name ) def __login_user( self, username, password, **kwargs ): """Logs user into the system # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.login_user(username, password, async_req=True) >>> result = thread.get() Args: username (str): The user name for login password (str): The password for login in clear text Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = \ username kwargs['password'] = \ password return self.call_with_http_info(**kwargs) self.login_user = Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/user/login', 'operation_id': 'login_user', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'username', 'password', ], 'required': [ 'username', 'password', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), 'password': (str,), }, 'attribute_map': { 'username': '******', 'password': '******', }, 'location_map': { 'username': '******', 'password': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__login_user ) def __logout_user( self, **kwargs ): """Logs out current logged in user session # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.logout_user(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) return self.call_with_http_info(**kwargs) self.logout_user = Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/logout', 'operation_id': 'logout_user', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__logout_user ) def __update_user( self, username, body, **kwargs ): """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_user(username, body, async_req=True) >>> result = thread.get() Args: username (str): name that need to be deleted body (user.User): Updated user object Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['username'] = \ username kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.update_user = Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'update_user', 'http_method': 'PUT', 'servers': [], }, params_map={ 'all': [ 'username', 'body', ], 'required': [ 'username', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), 'body': (user.User,), }, 'attribute_map': { 'username': '******', }, 'location_map': { 'username': '******', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__update_user )
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client self.create_user_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user', 'operation_id': 'create_user', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'user', ], 'required': [ 'user', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'user': (User,), }, 'attribute_map': { }, 'location_map': { 'user': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/json' ] }, api_client=api_client ) self.create_users_with_array_input_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/createWithArray', 'operation_id': 'create_users_with_array_input', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'user', ], 'required': [ 'user', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'user': ([User],), }, 'attribute_map': { }, 'location_map': { 'user': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/json' ] }, api_client=api_client ) self.create_users_with_list_input_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/createWithList', 'operation_id': 'create_users_with_list_input', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'user', ], 'required': [ 'user', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'user': ([User],), }, 'attribute_map': { }, 'location_map': { 'user': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/json' ] }, api_client=api_client ) self.delete_user_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'delete_user', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'username', ], 'required': [ 'username', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), }, 'attribute_map': { 'username': '******', }, 'location_map': { 'username': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client ) self.get_user_by_name_endpoint = _Endpoint( settings={ 'response_type': (User,), 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'get_user_by_name', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'username', ], 'required': [ 'username', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), }, 'attribute_map': { 'username': '******', }, 'location_map': { 'username': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client ) self.login_user_endpoint = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/user/login', 'operation_id': 'login_user', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'username', 'password', ], 'required': [ 'username', 'password', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), 'password': (str,), }, 'attribute_map': { 'username': '******', 'password': '******', }, 'location_map': { 'username': '******', 'password': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client ) self.logout_user_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/logout', 'operation_id': 'logout_user', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client ) self.update_user_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/user/{username}', 'operation_id': 'update_user', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'username', 'user', ], 'required': [ 'username', 'user', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'username': (str,), 'user': (User,), }, 'attribute_map': { 'username': '******', }, 'location_map': { 'username': '******', 'user': '******', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/json' ] }, api_client=api_client )
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client self.add_pet_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': ['http_signature_test', 'petstore_auth'], 'endpoint_path': '/pet', 'operation_id': 'add_pet', 'http_method': 'POST', 'servers': [ { 'url': "http://petstore.swagger.io/v2", 'description': "No description provided", }, { 'url': "http://path-server-test.petstore.local/v2", 'description': "No description provided", }, ] }, params_map={ 'all': [ 'pet', ], 'required': [ 'pet', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet': (Pet, ), }, 'attribute_map': {}, 'location_map': { 'pet': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/json', 'application/xml'] }, api_client=api_client) self.delete_pet_endpoint = _Endpoint(settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'delete_pet', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'api_key', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'api_key': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'api_key': 'api_key', }, 'location_map': { 'pet_id': 'path', 'api_key': 'header', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client) self.find_pets_by_status_endpoint = _Endpoint( settings={ 'response_type': ([Pet], ), 'auth': ['http_signature_test', 'petstore_auth'], 'endpoint_path': '/pet/findByStatus', 'operation_id': 'find_pets_by_status', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'status', ], 'required': [ 'status', ], 'nullable': [], 'enum': [ 'status', ], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': { ('status', ): { "AVAILABLE": "available", "PENDING": "pending", "SOLD": "sold" }, }, 'openapi_types': { 'status': ([str], ), }, 'attribute_map': { 'status': 'status', }, 'location_map': { 'status': 'query', }, 'collection_format_map': { 'status': 'csv', } }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client) self.find_pets_by_tags_endpoint = _Endpoint( settings={ 'response_type': ([Pet], ), 'auth': ['http_signature_test', 'petstore_auth'], 'endpoint_path': '/pet/findByTags', 'operation_id': 'find_pets_by_tags', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'tags', ], 'required': [ 'tags', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'tags': ([str], ), }, 'attribute_map': { 'tags': 'tags', }, 'location_map': { 'tags': 'query', }, 'collection_format_map': { 'tags': 'csv', } }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client) self.get_pet_by_id_endpoint = _Endpoint( settings={ 'response_type': (Pet, ), 'auth': ['api_key'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'get_pet_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'pet_id', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), }, 'attribute_map': { 'pet_id': 'petId', }, 'location_map': { 'pet_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client) self.update_pet_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': ['http_signature_test', 'petstore_auth'], 'endpoint_path': '/pet', 'operation_id': 'update_pet', 'http_method': 'PUT', 'servers': [ { 'url': "http://petstore.swagger.io/v2", 'description': "No description provided", }, { 'url': "http://path-server-test.petstore.local/v2", 'description': "No description provided", }, ] }, params_map={ 'all': [ 'pet', ], 'required': [ 'pet', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet': (Pet, ), }, 'attribute_map': {}, 'location_map': { 'pet': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/json', 'application/xml'] }, api_client=api_client) self.update_pet_with_form_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': ['petstore_auth'], 'endpoint_path': '/pet/{petId}', 'operation_id': 'update_pet_with_form', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'pet_id', 'name', 'status', ], 'required': [ 'pet_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'pet_id': (int, ), 'name': (str, ), 'status': (str, ), }, 'attribute_map': { 'pet_id': 'petId', 'name': 'name', 'status': 'status', }, 'location_map': { 'pet_id': 'path', 'name': 'form', 'status': 'form', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': ['application/x-www-form-urlencoded'] }, api_client=api_client)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client self.delete_order_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'delete_order', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'order_id', ], 'required': [ 'order_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'order_id': (str,), }, 'attribute_map': { 'order_id': 'order_id', }, 'location_map': { 'order_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client ) self.get_inventory_endpoint = _Endpoint( settings={ 'response_type': ({str: (int,)},), 'auth': [ 'api_key' ], 'endpoint_path': '/store/inventory', 'operation_id': 'get_inventory', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client ) self.get_order_by_id_endpoint = _Endpoint( settings={ 'response_type': (Order,), 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'get_order_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'order_id', ], 'required': [ 'order_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ 'order_id', ] }, root_map={ 'validations': { ('order_id',): { 'inclusive_maximum': 5, 'inclusive_minimum': 1, }, }, 'allowed_values': { }, 'openapi_types': { 'order_id': (int,), }, 'attribute_map': { 'order_id': 'order_id', }, 'location_map': { 'order_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client ) self.place_order_endpoint = _Endpoint( settings={ 'response_type': (Order,), 'auth': [], 'endpoint_path': '/store/order', 'operation_id': 'place_order', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'body': (Order,), }, 'attribute_map': { }, 'location_map': { 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/xml', 'application/json' ], 'content_type': [], }, api_client=api_client )
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __test_classname(self, body, **kwargs): # noqa: E501 """To test class name in snake case # noqa: E501 To test class name in snake case # 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_classname(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously Default is False. :param Client body: client model (required) :param _return_http_data_only: response data without head status code and headers. Default is True. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. :param _check_input_type: boolean specifying if type checking should be done one the data sent to the server. Default is True. :param _check_return_type: boolean specifying if type checking should be done one the data received from the server. Default is True. :param _host_index: integer specifying the index of the server that we want to use. Default is 0. :return: Client If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get('async_req', False) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['_preload_content'] = kwargs.get('_preload_content', True) kwargs['_request_timeout'] = kwargs.get('_request_timeout', None) kwargs['_check_input_type'] = kwargs.get('_check_input_type', True) kwargs['_check_return_type'] = kwargs.get('_check_return_type', True) kwargs['_host_index'] = kwargs.get('_host_index', 0) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.test_classname = Endpoint(settings={ 'response_type': (Client, ), 'auth': ['api_key_query'], 'endpoint_path': '/fake_classname_test', 'operation_id': 'test_classname', 'http_method': 'PATCH', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'body': (Client, ), }, 'attribute_map': {}, 'location_map': { 'body': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json'], 'content_type': ['application/json'] }, api_client=api_client, callable=__test_classname)
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __delete_order(self, order_id, **kwargs): # noqa: E501 """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_order(order_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str order_id: ID of the order that needs to be deleted (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['order_id'] = order_id return self.call_with_http_info(**kwargs) self.delete_order = Endpoint(settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'delete_order', 'http_method': 'DELETE', 'servers': [], }, params_map={ 'all': [ 'order_id', ], 'required': [ 'order_id', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'order_id': 'str', }, 'attribute_map': { 'order_id': 'order_id', }, 'location_map': { 'order_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__delete_order) def __get_inventory(self, **kwargs): # noqa: E501 """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_inventory(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: dict(str, int) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) return self.call_with_http_info(**kwargs) self.get_inventory = Endpoint(settings={ 'response_type': 'dict(str, int)', 'auth': ['api_key'], 'endpoint_path': '/store/inventory', 'operation_id': 'get_inventory', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [], 'required': [], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': {}, 'attribute_map': {}, 'location_map': {}, 'collection_format_map': {} }, headers_map={ 'accept': ['application/json'], 'content_type': [], }, api_client=api_client, callable=__get_inventory) def __get_order_by_id(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_order_by_id(order_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int order_id: ID of pet that needs to be fetched (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Order If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['order_id'] = order_id return self.call_with_http_info(**kwargs) self.get_order_by_id = Endpoint( settings={ 'response_type': 'Order', 'auth': [], 'endpoint_path': '/store/order/{order_id}', 'operation_id': 'get_order_by_id', 'http_method': 'GET', 'servers': [], }, params_map={ 'all': [ 'order_id', ], 'required': [ 'order_id', ], 'nullable': [], 'enum': [], 'validation': [ 'order_id', ] }, root_map={ 'validations': { ('order_id', ): { 'inclusive_maximum': 5, 'inclusive_minimum': 1, }, }, 'allowed_values': {}, 'openapi_types': { 'order_id': 'int', }, 'attribute_map': { 'order_id': 'order_id', }, 'location_map': { 'order_id': 'path', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client, callable=__get_order_by_id) def __place_order(self, body, **kwargs): # noqa: E501 """Place an order for a pet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.place_order(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param Order body: order placed for purchasing the pet (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Order If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True) kwargs['body'] = body return self.call_with_http_info(**kwargs) self.place_order = Endpoint( settings={ 'response_type': 'Order', 'auth': [], 'endpoint_path': '/store/order', 'operation_id': 'place_order', 'http_method': 'POST', 'servers': [], }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [], 'enum': [], 'validation': [] }, root_map={ 'validations': {}, 'allowed_values': {}, 'openapi_types': { 'body': 'Order', }, 'attribute_map': {}, 'location_map': { 'body': 'body', }, 'collection_format_map': {} }, headers_map={ 'accept': ['application/xml', 'application/json'], 'content_type': [], }, api_client=api_client, callable=__place_order)