=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: UNLICENSED https://help.mypurecloud.com/articles/terms-and-conditions/ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/ =end require "uri" module PureCloud class LanguageUnderstandingApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete an NLU Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @return [nil] def delete_languageunderstanding_domain(domain_id, opts = {}) delete_languageunderstanding_domain_with_http_info(domain_id, opts) return nil end # Delete an NLU Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_languageunderstanding_domain_with_http_info(domain_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.delete_languageunderstanding_domain ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.delete_languageunderstanding_domain" if domain_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#delete_languageunderstanding_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete the feedback on the NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param feedback_id ID of the Feedback # @param [Hash] opts the optional parameters # @return [nil] def delete_languageunderstanding_domain_feedback_feedback_id(domain_id, feedback_id, opts = {}) delete_languageunderstanding_domain_feedback_feedback_id_with_http_info(domain_id, feedback_id, opts) return nil end # Delete the feedback on the NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param feedback_id ID of the Feedback # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_languageunderstanding_domain_feedback_feedback_id_with_http_info(domain_id, feedback_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.delete_languageunderstanding_domain_feedback_feedback_id ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.delete_languageunderstanding_domain_feedback_feedback_id" if domain_id.nil? # verify the required parameter 'feedback_id' is set fail ArgumentError, "Missing the required parameter 'feedback_id' when calling LanguageUnderstandingApi.delete_languageunderstanding_domain_feedback_feedback_id" if feedback_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/feedback/{feedbackId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'feedbackId' + '}', feedback_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#delete_languageunderstanding_domain_feedback_feedback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Find an NLU Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @return [NluDomain] def get_languageunderstanding_domain(domain_id, opts = {}) data, _status_code, _headers = get_languageunderstanding_domain_with_http_info(domain_id, opts) return data end # Find an NLU Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @return [Array<(NluDomain, Fixnum, Hash)>] NluDomain data, response status code and response headers def get_languageunderstanding_domain_with_http_info(domain_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domain ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain" if domain_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomain') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all feedback in the given NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [String] :intent_name The top intent name to retrieve feedback for. # @option opts [String] :assessment The top assessment to retrieve feedback for. # @option opts [Date] :date_start Begin of time window as ISO-8601 date. # @option opts [Date] :date_end End of time window as ISO-8601 date. # @option opts [BOOLEAN] :include_deleted Whether to include soft-deleted items in the result. # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Array] :fields Fields and properties to get, comma-separated # @return [NluFeedbackListing] def get_languageunderstanding_domain_feedback(domain_id, opts = {}) data, _status_code, _headers = get_languageunderstanding_domain_feedback_with_http_info(domain_id, opts) return data end # Get all feedback in the given NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [String] :intent_name The top intent name to retrieve feedback for. # @option opts [String] :assessment The top assessment to retrieve feedback for. # @option opts [Date] :date_start Begin of time window as ISO-8601 date. # @option opts [Date] :date_end End of time window as ISO-8601 date. # @option opts [BOOLEAN] :include_deleted Whether to include soft-deleted items in the result. # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [Array] :fields Fields and properties to get, comma-separated # @return [Array<(NluFeedbackListing, Fixnum, Hash)>] NluFeedbackListing data, response status code and response headers def get_languageunderstanding_domain_feedback_with_http_info(domain_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domain_feedback ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_feedback" if domain_id.nil? if opts[:'assessment'] && !['Incorrect', 'Correct', 'Unknown'].include?(opts[:'assessment']) fail ArgumentError, 'invalid value for "assessment", must be one of Incorrect, Correct, Unknown' end # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/feedback".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s) # query parameters query_params = {} query_params[:'intentName'] = opts[:'intent_name'] if opts[:'intent_name'] query_params[:'assessment'] = opts[:'assessment'] if opts[:'assessment'] query_params[:'dateStart'] = opts[:'date_start'] if opts[:'date_start'] query_params[:'dateEnd'] = opts[:'date_end'] if opts[:'date_end'] query_params[:'includeDeleted'] = opts[:'include_deleted'] if opts[:'include_deleted'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if opts[:'fields'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluFeedbackListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domain_feedback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Find a Feedback # # @param domain_id ID of the NLU domain. # @param feedback_id ID of the Feedback # @param [Hash] opts the optional parameters # @option opts [Array] :fields Fields and properties to get, comma-separated # @return [NluFeedbackResponse] def get_languageunderstanding_domain_feedback_feedback_id(domain_id, feedback_id, opts = {}) data, _status_code, _headers = get_languageunderstanding_domain_feedback_feedback_id_with_http_info(domain_id, feedback_id, opts) return data end # Find a Feedback # # @param domain_id ID of the NLU domain. # @param feedback_id ID of the Feedback # @param [Hash] opts the optional parameters # @option opts [Array] :fields Fields and properties to get, comma-separated # @return [Array<(NluFeedbackResponse, Fixnum, Hash)>] NluFeedbackResponse data, response status code and response headers def get_languageunderstanding_domain_feedback_feedback_id_with_http_info(domain_id, feedback_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domain_feedback_feedback_id ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_feedback_feedback_id" if domain_id.nil? # verify the required parameter 'feedback_id' is set fail ArgumentError, "Missing the required parameter 'feedback_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_feedback_feedback_id" if feedback_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/feedback/{feedbackId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'feedbackId' + '}', feedback_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if opts[:'fields'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluFeedbackResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domain_feedback_feedback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Find an NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_utterances Whether utterances for intent definition should be included when marshalling response. # @return [NluDomainVersion] def get_languageunderstanding_domain_version(domain_id, domain_version_id, opts = {}) data, _status_code, _headers = get_languageunderstanding_domain_version_with_http_info(domain_id, domain_version_id, opts) return data end # Find an NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_utterances Whether utterances for intent definition should be included when marshalling response. # @return [Array<(NluDomainVersion, Fixnum, Hash)>] NluDomainVersion data, response status code and response headers def get_languageunderstanding_domain_version_with_http_info(domain_id, domain_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domain_version ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_version" if domain_id.nil? # verify the required parameter 'domain_version_id' is set fail ArgumentError, "Missing the required parameter 'domain_version_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_version" if domain_version_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'domainVersionId' + '}', domain_version_id.to_s) # query parameters query_params = {} query_params[:'includeUtterances'] = opts[:'include_utterances'] if opts[:'include_utterances'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainVersion') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domain_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieved quality report for the specified NLU Domain Version # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @return [NluDomainVersionQualityReport] def get_languageunderstanding_domain_version_report(domain_id, domain_version_id, opts = {}) data, _status_code, _headers = get_languageunderstanding_domain_version_report_with_http_info(domain_id, domain_version_id, opts) return data end # Retrieved quality report for the specified NLU Domain Version # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @return [Array<(NluDomainVersionQualityReport, Fixnum, Hash)>] NluDomainVersionQualityReport data, response status code and response headers def get_languageunderstanding_domain_version_report_with_http_info(domain_id, domain_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domain_version_report ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_version_report" if domain_id.nil? # verify the required parameter 'domain_version_id' is set fail ArgumentError, "Missing the required parameter 'domain_version_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_version_report" if domain_version_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/report".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'domainVersionId' + '}', domain_version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainVersionQualityReport') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domain_version_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all NLU Domain Versions for a given Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_utterances Whether utterances for intent definition should be included when marshalling response. # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @return [NluDomainVersionListing] def get_languageunderstanding_domain_versions(domain_id, opts = {}) data, _status_code, _headers = get_languageunderstanding_domain_versions_with_http_info(domain_id, opts) return data end # Get all NLU Domain Versions for a given Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_utterances Whether utterances for intent definition should be included when marshalling response. # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @return [Array<(NluDomainVersionListing, Fixnum, Hash)>] NluDomainVersionListing data, response status code and response headers def get_languageunderstanding_domain_versions_with_http_info(domain_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domain_versions ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.get_languageunderstanding_domain_versions" if domain_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s) # query parameters query_params = {} query_params[:'includeUtterances'] = opts[:'include_utterances'] if opts[:'include_utterances'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainVersionListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domain_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all NLU Domains. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @return [NluDomainListing] def get_languageunderstanding_domains(opts = {}) data, _status_code, _headers = get_languageunderstanding_domains_with_http_info(opts) return data end # Get all NLU Domains. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @return [Array<(NluDomainListing, Fixnum, Hash)>] NluDomainListing data, response status code and response headers def get_languageunderstanding_domains_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.get_languageunderstanding_domains ..." end # resource path local_var_path = "/api/v2/languageunderstanding/domains".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#get_languageunderstanding_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an NLU Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [NluDomain] :body # @return [NluDomain] def patch_languageunderstanding_domain(domain_id, opts = {}) data, _status_code, _headers = patch_languageunderstanding_domain_with_http_info(domain_id, opts) return data end # Update an NLU Domain. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [NluDomain] :body # @return [Array<(NluDomain, Fixnum, Hash)>] NluDomain data, response status code and response headers def patch_languageunderstanding_domain_with_http_info(domain_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.patch_languageunderstanding_domain ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.patch_languageunderstanding_domain" if domain_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomain') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#patch_languageunderstanding_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create feedback for the NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [NluFeedbackRequest] :body # @return [NluFeedbackResponse] def post_languageunderstanding_domain_feedback(domain_id, opts = {}) data, _status_code, _headers = post_languageunderstanding_domain_feedback_with_http_info(domain_id, opts) return data end # Create feedback for the NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param [Hash] opts the optional parameters # @option opts [NluFeedbackRequest] :body # @return [Array<(NluFeedbackResponse, Fixnum, Hash)>] NluFeedbackResponse data, response status code and response headers def post_languageunderstanding_domain_feedback_with_http_info(domain_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.post_languageunderstanding_domain_feedback ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_feedback" if domain_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/feedback".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluFeedbackResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#post_languageunderstanding_domain_feedback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Detect intent, entities, etc. in the submitted text using the specified NLU domain version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @option opts [NluDetectionRequest] :body # @return [NluDetectionResponse] def post_languageunderstanding_domain_version_detect(domain_id, domain_version_id, opts = {}) data, _status_code, _headers = post_languageunderstanding_domain_version_detect_with_http_info(domain_id, domain_version_id, opts) return data end # Detect intent, entities, etc. in the submitted text using the specified NLU domain version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @option opts [NluDetectionRequest] :body # @return [Array<(NluDetectionResponse, Fixnum, Hash)>] NluDetectionResponse data, response status code and response headers def post_languageunderstanding_domain_version_detect_with_http_info(domain_id, domain_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.post_languageunderstanding_domain_version_detect ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_version_detect" if domain_id.nil? # verify the required parameter 'domain_version_id' is set fail ArgumentError, "Missing the required parameter 'domain_version_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_version_detect" if domain_version_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/detect".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'domainVersionId' + '}', domain_version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDetectionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#post_languageunderstanding_domain_version_detect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Publish the draft NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @return [NluDomainVersion] def post_languageunderstanding_domain_version_publish(domain_id, domain_version_id, opts = {}) data, _status_code, _headers = post_languageunderstanding_domain_version_publish_with_http_info(domain_id, domain_version_id, opts) return data end # Publish the draft NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @return [Array<(NluDomainVersion, Fixnum, Hash)>] NluDomainVersion data, response status code and response headers def post_languageunderstanding_domain_version_publish_with_http_info(domain_id, domain_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.post_languageunderstanding_domain_version_publish ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_version_publish" if domain_id.nil? # verify the required parameter 'domain_version_id' is set fail ArgumentError, "Missing the required parameter 'domain_version_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_version_publish" if domain_version_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/publish".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'domainVersionId' + '}', domain_version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainVersion') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#post_languageunderstanding_domain_version_publish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Train the draft NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @return [NluDomainVersionTrainingResponse] def post_languageunderstanding_domain_version_train(domain_id, domain_version_id, opts = {}) data, _status_code, _headers = post_languageunderstanding_domain_version_train_with_http_info(domain_id, domain_version_id, opts) return data end # Train the draft NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @return [Array<(NluDomainVersionTrainingResponse, Fixnum, Hash)>] NluDomainVersionTrainingResponse data, response status code and response headers def post_languageunderstanding_domain_version_train_with_http_info(domain_id, domain_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.post_languageunderstanding_domain_version_train ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_version_train" if domain_id.nil? # verify the required parameter 'domain_version_id' is set fail ArgumentError, "Missing the required parameter 'domain_version_id' when calling LanguageUnderstandingApi.post_languageunderstanding_domain_version_train" if domain_version_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/train".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'domainVersionId' + '}', domain_version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainVersionTrainingResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#post_languageunderstanding_domain_version_train\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an NLU Domain. # # @param [Hash] opts the optional parameters # @option opts [NluDomain] :body # @return [NluDomain] def post_languageunderstanding_domains(opts = {}) data, _status_code, _headers = post_languageunderstanding_domains_with_http_info(opts) return data end # Create an NLU Domain. # # @param [Hash] opts the optional parameters # @option opts [NluDomain] :body # @return [Array<(NluDomain, Fixnum, Hash)>] NluDomain data, response status code and response headers def post_languageunderstanding_domains_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.post_languageunderstanding_domains ..." end # resource path local_var_path = "/api/v2/languageunderstanding/domains".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomain') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#post_languageunderstanding_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @option opts [NluDomainVersion] :body # @return [NluDomainVersion] def put_languageunderstanding_domain_version(domain_id, domain_version_id, opts = {}) data, _status_code, _headers = put_languageunderstanding_domain_version_with_http_info(domain_id, domain_version_id, opts) return data end # Update an NLU Domain Version. # # @param domain_id ID of the NLU domain. # @param domain_version_id ID of the NLU domain version. # @param [Hash] opts the optional parameters # @option opts [NluDomainVersion] :body # @return [Array<(NluDomainVersion, Fixnum, Hash)>] NluDomainVersion data, response status code and response headers def put_languageunderstanding_domain_version_with_http_info(domain_id, domain_version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LanguageUnderstandingApi.put_languageunderstanding_domain_version ..." end # verify the required parameter 'domain_id' is set fail ArgumentError, "Missing the required parameter 'domain_id' when calling LanguageUnderstandingApi.put_languageunderstanding_domain_version" if domain_id.nil? # verify the required parameter 'domain_version_id' is set fail ArgumentError, "Missing the required parameter 'domain_version_id' when calling LanguageUnderstandingApi.put_languageunderstanding_domain_version" if domain_version_id.nil? # resource path local_var_path = "/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}".sub('{format}','json').sub('{' + 'domainId' + '}', domain_id.to_s).sub('{' + 'domainVersionId' + '}', domain_version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NluDomainVersion') if @api_client.config.debugging @api_client.config.logger.debug "API called: LanguageUnderstandingApi#put_languageunderstanding_domain_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end