def aivr_get_with_http_info(self, ivr_sid, **kwargs): # noqa: E501 """Get AIVR Session # noqa: E501 Get AIVR Session (Telephony Bot Session) with given session id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aivr_get_with_http_info(ivr_sid, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str ivr_sid: ID of the AIVR session on Voicegain system. (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: tuple(CoreAIVRSession, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['ivr_sid'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method aivr_get" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'ivr_sid' is set if self.api_client.client_side_validation and ( 'ivr_sid' not in local_var_params or # noqa: E501 local_var_params['ivr_sid'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `ivr_sid` when calling `aivr_get`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'ivr_sid' in local_var_params and # noqa: E501 len(local_var_params['ivr_sid']) > 48): # noqa: E501 raise ApiValueError( "Invalid value for parameter `ivr_sid` when calling `aivr_get`, length must be less than or equal to `48`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'ivr_sid' in local_var_params and # noqa: E501 len(local_var_params['ivr_sid']) < 16): # noqa: E501 raise ApiValueError( "Invalid value for parameter `ivr_sid` when calling `aivr_get`, length must be greater than or equal to `16`" ) # noqa: E501 collection_formats = {} path_params = {} if 'ivr_sid' in local_var_params: path_params['ivrSid'] = local_var_params['ivr_sid'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/aivr/{ivrSid}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CoreAIVRSession', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def websocket_post_with_http_info(self, websocket_modifiable, **kwargs): # noqa: E501 """Create websocket # noqa: E501 Create websocket object with unique 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.websocket_post_with_http_info(websocket_modifiable, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param WebsocketModifiable websocket_modifiable: Body of websocket creation request. Note: contextId will generally be extracted from the JWT, so it is optional. (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: tuple(Websocket, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['websocket_modifiable'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method websocket_post" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'websocket_modifiable' is set if self.api_client.client_side_validation and ('websocket_modifiable' not in local_var_params or # noqa: E501 local_var_params['websocket_modifiable'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `websocket_modifiable` when calling `websocket_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'websocket_modifiable' in local_var_params: body_params = local_var_params['websocket_modifiable'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/JSON', 'application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/websocket', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Websocket', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def websocket_delete_with_http_info(self, name, **kwargs): # noqa: E501 """Delete websocket # noqa: E501 Delete websocket object identified by a 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.websocket_delete_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of an object (only select objects have unique names) (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: tuple(Websocket, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method websocket_delete" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 local_var_params['name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `websocket_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/JSON']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth'] # noqa: E501 return self.api_client.call_api( '/websocket/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Websocket', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def training_set_query_with_http_info(self, **kwargs): # noqa: E501 """Query Training Sets # noqa: E501 Get Training Sets. If creator=`Customer` it will return all Customer defined training sets for a given account. If creator=`VoiceGain` it will return all VoiceGain training Set. If creator parameter is missing it will return a union of Customer own and VoiceGain training sets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.training_set_query_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreatingEntity creator: Creating Entity :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: tuple(list[TrainingSetDoc], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['creator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method training_set_query" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'creator' in local_var_params and local_var_params[ 'creator'] is not None: # noqa: E501 query_params.append( ('creator', local_var_params['creator'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/training/set', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[TrainingSetDoc]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def websocket_get_with_http_info(self, name, **kwargs): # noqa: E501 """Get websocket # noqa: E501 Get websocket object by its unique name. Note, this method does not require JWT Token, but if JWT token is missing and websocket is not public it will return error response. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.websocket_get_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of an object (only select objects have unique names) (required) :param str msg_dates: Date or Dates of events. Values are in UTC time. :param int msg_count: Max number of messages to return :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: tuple(Websocket, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['name', 'msg_dates', 'msg_count'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method websocket_get" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 local_var_params['name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `websocket_get`") # noqa: E501 if self.api_client.client_side_validation and 'msg_count' in local_var_params and local_var_params['msg_count'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `msg_count` when calling `websocket_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] if 'msg_dates' in local_var_params and local_var_params['msg_dates'] is not None: # noqa: E501 query_params.append(('msgDates', local_var_params['msg_dates'])) # noqa: E501 if 'msg_count' in local_var_params and local_var_params['msg_count'] is not None: # noqa: E501 query_params.append(('msgCount', local_var_params['msg_count'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/JSON']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/websocket/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Websocket', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def training_set_post_with_http_info(self, **kwargs): # noqa: E501 """Create Training Set # noqa: E501 Prepare a new Training Set. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.training_set_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param TrainingSetDoc training_set_doc: This example shows minimal content of the request :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: tuple(TrainingSetDoc, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['training_set_doc'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method training_set_post" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'training_set_doc' in local_var_params: body_params = local_var_params['training_set_doc'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/training/set', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TrainingSetDoc', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def training_set_put_with_http_info(self, uuid, **kwargs): # noqa: E501 """Modify Training Set # noqa: E501 Can be used to modify the Traing Set. The optional \"build\" parameter can use used to trigger start of the Training Set processing after modification. The response will contain information about the training set after modification. If \"build\" was requested, it will happen in the background and the response will be immediate. You can use GET method to poll for the change in the \"status\" field. NOTE 1 - in order to just trigger a build, the body of this request will usually just contain a value of `acousticModelUsed` Id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.training_set_put_with_http_info(uuid, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str uuid: UUID of an object. **Note** - attempt to access objects outside of the Account will return an Error. (required) :param bool build: if true the build will start, e.g. the backend may change the appropriate status field value to \"starting\" :param TrainingSetModifiable training_set_modifiable: Data with modifications to be applied to the TrainingSet :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: tuple(TrainingSetDoc, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['uuid', 'build', 'training_set_modifiable'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method training_set_put" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'uuid' is set if self.api_client.client_side_validation and ( 'uuid' not in local_var_params or # noqa: E501 local_var_params['uuid'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `uuid` when calling `training_set_put`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'uuid' in local_var_params and # noqa: E501 len(local_var_params['uuid']) > 48): # noqa: E501 raise ApiValueError( "Invalid value for parameter `uuid` when calling `training_set_put`, length must be less than or equal to `48`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'uuid' in local_var_params and # noqa: E501 len(local_var_params['uuid']) < 16): # noqa: E501 raise ApiValueError( "Invalid value for parameter `uuid` when calling `training_set_put`, length must be greater than or equal to `16`" ) # noqa: E501 collection_formats = {} path_params = {} if 'uuid' in local_var_params: path_params['uuid'] = local_var_params['uuid'] # noqa: E501 query_params = [] if 'build' in local_var_params and local_var_params[ 'build'] is not None: # noqa: E501 query_params.append( ('build', local_var_params['build'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'training_set_modifiable' in local_var_params: body_params = local_var_params['training_set_modifiable'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/training/set/{uuid}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TrainingSetDoc', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def training_set_key_post_with_http_info(self, uuid, **kwargs): # noqa: E501 """New Training Set Key # noqa: E501 Request new Key for Training Set data uploads. Each time this method is called it will return a **new** key. The key will expire after 24 hours. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.training_set_key_post_with_http_info(uuid, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str uuid: UUID of an object. **Note** - attempt to access objects outside of the Account will return an Error. (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: tuple(TrainingSetKey, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['uuid'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method training_set_key_post" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'uuid' is set if self.api_client.client_side_validation and ( 'uuid' not in local_var_params or # noqa: E501 local_var_params['uuid'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `uuid` when calling `training_set_key_post`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'uuid' in local_var_params and # noqa: E501 len(local_var_params['uuid']) > 48): # noqa: E501 raise ApiValueError( "Invalid value for parameter `uuid` when calling `training_set_key_post`, length must be less than or equal to `48`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'uuid' in local_var_params and # noqa: E501 len(local_var_params['uuid']) < 16): # noqa: E501 raise ApiValueError( "Invalid value for parameter `uuid` when calling `training_set_key_post`, length must be greater than or equal to `16`" ) # noqa: E501 collection_formats = {} path_params = {} if 'uuid' in local_var_params: path_params['uuid'] = local_var_params['uuid'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/training/set/{uuid}/key', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TrainingSetKey', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def asr_recognize_callback_with_http_info(self, **kwargs): # noqa: E501 """Recognition Callback # noqa: E501 Needs to be implemented by the user of the API on a URL of your choice.</br> Receive speech recognition callback with results.</br> Request payload will contain either the intermediate or the final content of the recognition of the provided audio.</br> Note, that for ASR recognition, as opposed to transcription, only the final response will contain utterance and semantic tags (unless continuousRecognition is enabled). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.asr_recognize_callback_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param AsyncRecognitionResponse async_recognition_response: ASR Recognize Callback Payload :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: tuple(AsyncRecognitionCallbackResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['async_recognition_response'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method asr_recognize_callback" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'async_recognition_response' in local_var_params: body_params = local_var_params['async_recognition_response'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/customer/asr-recognize-callback', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AsyncRecognitionCallbackResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def aivr_callback_delete_with_http_info(self, csid, seq, **kwargs): # noqa: E501 """End Bot Session # noqa: E501 Specification of a callback method that Voicegain Platform will use to communicate end of Telephony Bot Session to the User's dialog control logic.</br> **Note 1:** the url provided here is not relevant. User can implement this method on any url (consistent with corresponding PUT and DELETE methods).<br> **Note 2:** it is possible to configure AIVR app to send the `csid` either in the path (as in example here), in the query, or in the body of the callback request. Request definition specifies what data will be sent from Voicegain to User system.</br> Response definition specifies what data will be sent from User system to Voicegain. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aivr_callback_delete_with_http_info(csid, seq, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str csid: ID of the AIVR session on customer's system. (required) :param int seq: Interaction sequences of the AIVR session on Voicegain system. (required) :param AIVRExistingSession aivr_existing_session: Body of Telephony Bot Callback request. :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: tuple(AIVRCallbackResponseFinal, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['csid', 'seq', 'aivr_existing_session'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method aivr_callback_delete" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'csid' is set if self.api_client.client_side_validation and ( 'csid' not in local_var_params or # noqa: E501 local_var_params['csid'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `csid` when calling `aivr_callback_delete`" ) # noqa: E501 # verify the required parameter 'seq' is set if self.api_client.client_side_validation and ( 'seq' not in local_var_params or # noqa: E501 local_var_params['seq'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `seq` when calling `aivr_callback_delete`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'csid' in local_var_params and # noqa: E501 len(local_var_params['csid']) > 256): # noqa: E501 raise ApiValueError( "Invalid value for parameter `csid` when calling `aivr_callback_delete`, length must be less than or equal to `256`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'csid' in local_var_params and # noqa: E501 len(local_var_params['csid']) < 1): # noqa: E501 raise ApiValueError( "Invalid value for parameter `csid` when calling `aivr_callback_delete`, length must be greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and 'seq' in local_var_params and local_var_params[ 'seq'] < 1: # noqa: E501 raise ApiValueError( "Invalid value for parameter `seq` when calling `aivr_callback_delete`, must be a value greater than or equal to `1`" ) # noqa: E501 collection_formats = {} path_params = {} if 'csid' in local_var_params: path_params['csid'] = local_var_params['csid'] # noqa: E501 query_params = [] if 'seq' in local_var_params and local_var_params[ 'seq'] is not None: # noqa: E501 query_params.append(('seq', local_var_params['seq'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'aivr_existing_session' in local_var_params: body_params = local_var_params['aivr_existing_session'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth'] # noqa: E501 return self.api_client.call_api( '/customer/aivr-callback/{csid}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AIVRCallbackResponseFinal', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def aivr_callback_new_with_http_info(self, **kwargs): # noqa: E501 """New Bot Session # noqa: E501 Specification of a callback method that Voicegain Platform will invoke to indicate start of new Telephony Bot session to the User's dialog control logic.</br> Note: the url provided here is not relevant. User can implement this method on any url (consistent with corresponding PUT and DELETE methods). **Request** definition specifies what data will be sent from Voicegain Telephony Bot Session to User system.</br> **Response** definition specifies what data will be sent from User dialog system to Voicegain Telephony Bot Session Engine. Response contains instructions for Voicegain Telephony Bot Session Engine (including TTS and ASR) in response to the data received in the Callback request.</br> Possible actions that may be requested from Voicegain are: + prompt + question + disconnect + transfer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aivr_callback_new_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param AIVRNewSession aivr_new_session: Body of Telephony Bot Callback request. :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: tuple(AIVRCallbackResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['aivr_new_session'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method aivr_callback_new" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'aivr_new_session' in local_var_params: body_params = local_var_params['aivr_new_session'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth'] # noqa: E501 return self.api_client.call_api( '/customer/aivr-callback', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AIVRCallbackResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def security_jwt_get_with_http_info(self, aud, **kwargs): # noqa: E501 """Short-Lived JWT # noqa: E501 Get short-lived JWT token. </br> The returned JWT will expire in the specified number of seconds (the `expInSec` parameter). </br> Additionally, the JWT is also limited to the specified origin of the requests (the `aud` parameter). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.security_jwt_get_with_http_info(aud, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str aud: Domain from which the requests using this JWT should be allowed.</br> Will be inspected only if the request has \"Origin\" header, which will generally be true for requests coming from web browser.</br> Subdomains with wildcards are allowed, see example. Wildcard alone, i.e. \"*\" is allowed, but not recommended. (required) :param int exp_in_sec: Number of seconds from now when the JWT is to expire :param str api: API to which the generated JWT may apply. This results in different `sub` value within JWT value being generated, e.g., \"sub\": \"api:/data-prep:bd14fd94-0c3c-4c9a-82ee-ccf0dbef6729\". This can be used in limiting applicability of the JWT only to certain APIs. :param str context_id: Context Id. Only needed if making a request without JWT but using MAC Access Authentication instead. :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: tuple(str, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['aud', 'exp_in_sec', 'api', 'context_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method security_jwt_get" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'aud' is set if self.api_client.client_side_validation and ( 'aud' not in local_var_params or # noqa: E501 local_var_params['aud'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `aud` when calling `security_jwt_get`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'aud' in local_var_params and # noqa: E501 len(local_var_params['aud']) > 128): # noqa: E501 raise ApiValueError( "Invalid value for parameter `aud` when calling `security_jwt_get`, length must be less than or equal to `128`" ) # noqa: E501 if self.api_client.client_side_validation and 'exp_in_sec' in local_var_params and local_var_params[ 'exp_in_sec'] > 3600: # noqa: E501 raise ApiValueError( "Invalid value for parameter `exp_in_sec` when calling `security_jwt_get`, must be a value less than or equal to `3600`" ) # noqa: E501 if self.api_client.client_side_validation and 'exp_in_sec' in local_var_params and local_var_params[ 'exp_in_sec'] < 1: # noqa: E501 raise ApiValueError( "Invalid value for parameter `exp_in_sec` when calling `security_jwt_get`, must be a value greater than or equal to `1`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'api' in local_var_params and # noqa: E501 len(local_var_params['api']) > 128): # noqa: E501 raise ApiValueError( "Invalid value for parameter `api` when calling `security_jwt_get`, length must be less than or equal to `128`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'context_id' in local_var_params and # noqa: E501 len(local_var_params['context_id']) > 48): # noqa: E501 raise ApiValueError( "Invalid value for parameter `context_id` when calling `security_jwt_get`, length must be less than or equal to `48`" ) # noqa: E501 if self.api_client.client_side_validation and ( 'context_id' in local_var_params and # noqa: E501 len(local_var_params['context_id']) < 16): # noqa: E501 raise ApiValueError( "Invalid value for parameter `context_id` when calling `security_jwt_get`, length must be greater than or equal to `16`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'exp_in_sec' in local_var_params and local_var_params[ 'exp_in_sec'] is not None: # noqa: E501 query_params.append( ('expInSec', local_var_params['exp_in_sec'])) # noqa: E501 if 'aud' in local_var_params and local_var_params[ 'aud'] is not None: # noqa: E501 query_params.append(('aud', local_var_params['aud'])) # noqa: E501 if 'api' in local_var_params and local_var_params[ 'api'] is not None: # noqa: E501 query_params.append(('api', local_var_params['api'])) # noqa: E501 if 'context_id' in local_var_params and local_var_params[ 'context_id'] is not None: # noqa: E501 query_params.append( ('contextId', local_var_params['context_id'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # noqa: E501 # Authentication setting auth_settings = ['bearerJWTAuth', 'macSignature'] # noqa: E501 return self.api_client.call_api( '/security/jwt', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)